Skip to content

Commit 41ff95e

Browse files
committedOct 20, 2019
⚒ update dependencies
1 parent 4942012 commit 41ff95e

7 files changed

+46
-31
lines changed
 

‎.eslintrc.yml

+10-8
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
root: true
22

33
extends:
4-
- plugin:@mysticatea/es2015
5-
- plugin:@mysticatea/+modules
6-
- plugin:@mysticatea/+node
4+
- plugin:@mysticatea/es2015
75

8-
rules:
9-
init-declarations: "off"
10-
"@mysticatea/node/no-unsupported-features/es-syntax":
6+
overrides:
7+
- files:
8+
- src/**/*.js
9+
- test/**/*.js
10+
extends: plugin:@mysticatea/+modules
11+
rules:
12+
init-declarations: "off"
13+
"@mysticatea/node/no-unsupported-features/es-syntax":
1114
- error
12-
- ignores:
13-
- modules
15+
- ignores: [modules]

‎docs/.vuepress/config.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use strict"
2+
13
module.exports = {
24
title: "eslint-utils",
35
description: "Utilities for ESLint plugins and custom rules.",
File renamed without changes.

‎package.json

+12-12
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,23 @@
1212
"index.*"
1313
],
1414
"dependencies": {
15-
"eslint-visitor-keys": "^1.0.0"
15+
"eslint-visitor-keys": "^1.1.0"
1616
},
1717
"devDependencies": {
18-
"@mysticatea/eslint-plugin": "^10.0.3",
19-
"codecov": "^3.0.2",
18+
"@mysticatea/eslint-plugin": "^12.0.0",
19+
"codecov": "^3.6.1",
2020
"dot-prop": "^4.2.0",
21-
"eslint": "^5.16.0",
22-
"esm": "^3.0.55",
23-
"espree": "^5.0.1",
24-
"mocha": "^5.2.0",
21+
"eslint": "^6.5.1",
22+
"esm": "^3.2.25",
23+
"espree": "^6.1.1",
24+
"mocha": "^6.2.2",
2525
"npm-run-all": "^4.1.5",
26-
"nyc": "^13.0.1",
27-
"opener": "^1.4.3",
28-
"rimraf": "^2.6.2",
29-
"rollup": "^1.16.7",
26+
"nyc": "^14.1.1",
27+
"opener": "^1.5.1",
28+
"rimraf": "^3.0.0",
29+
"rollup": "^1.25.0",
3030
"rollup-plugin-sourcemaps": "^0.4.2",
31-
"vuepress": "^0.14.4",
31+
"vuepress": "^1.2.0",
3232
"warun": "^1.0.0"
3333
},
3434
"scripts": {

‎src/get-static-value.js

+16-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
1-
/* globals BigInt */
1+
/* globals BigInt, globalThis, global, self, window */
22

33
import { findVariable } from "./find-variable"
44

5+
const globalObject =
6+
typeof globalThis !== "undefined"
7+
? globalThis
8+
: typeof self !== "undefined"
9+
? self
10+
: typeof window !== "undefined"
11+
? window
12+
: typeof global !== "undefined"
13+
? global
14+
: {}
15+
516
const builtinNames = Object.freeze(
617
new Set([
718
"Array",
@@ -76,13 +87,13 @@ const callAllowed = new Set(
7687
Number.parseFloat,
7788
Number.parseInt,
7889
Object,
79-
Object.entries, //eslint-disable-line @mysticatea/node/no-unsupported-features/es-builtins
90+
Object.entries,
8091
Object.is,
8192
Object.isExtensible,
8293
Object.isFrozen,
8394
Object.isSealed,
8495
Object.keys,
85-
Object.values, //eslint-disable-line @mysticatea/node/no-unsupported-features/es-builtins
96+
Object.values,
8697
parseFloat,
8798
parseInt,
8899
RegExp,
@@ -294,9 +305,9 @@ const operations = Object.freeze({
294305
variable != null &&
295306
variable.defs.length === 0 &&
296307
builtinNames.has(variable.name) &&
297-
variable.name in global
308+
variable.name in globalObject
298309
) {
299-
return { value: global[variable.name] }
310+
return { value: globalObject[variable.name] }
300311
}
301312

302313
// Constants.

‎src/reference-tracker.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,11 @@ export class ReferenceTracker {
162162
esm
163163
? nextTraceMap
164164
: this.mode === "legacy"
165-
? Object.assign(
166-
{ default: nextTraceMap },
167-
nextTraceMap
168-
)
169-
: { default: nextTraceMap }
165+
? Object.assign(
166+
{ default: nextTraceMap },
167+
nextTraceMap
168+
)
169+
: { default: nextTraceMap }
170170
)
171171

172172
if (esm) {

‎test/pattern-matcher.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { PatternMatcher } from "../src/"
33

44
const NAMED_CAPTURE_GROUP_SUPPORTED = (() => {
55
try {
6-
new RegExp("(?<a>)", "u") //eslint-disable-line no-new, @mysticatea/node/no-unsupported-features/es-syntax
6+
new RegExp("(?<a>)", "u") //eslint-disable-line no-new, prefer-regex-literals, @mysticatea/node/no-unsupported-features/es-syntax
77
return true
88
} catch (_error) {
99
return false

0 commit comments

Comments
 (0)
Please sign in to comment.