Skip to content

Commit

Permalink
⚒ update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
mysticatea committed Oct 20, 2019
1 parent 4942012 commit 41ff95e
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 31 deletions.
18 changes: 10 additions & 8 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
root: true

extends:
- plugin:@mysticatea/es2015
- plugin:@mysticatea/+modules
- plugin:@mysticatea/+node
- plugin:@mysticatea/es2015

rules:
init-declarations: "off"
"@mysticatea/node/no-unsupported-features/es-syntax":
overrides:
- files:
- src/**/*.js
- test/**/*.js
extends: plugin:@mysticatea/+modules
rules:
init-declarations: "off"
"@mysticatea/node/no-unsupported-features/es-syntax":
- error
- ignores:
- modules
- ignores: [modules]
2 changes: 2 additions & 0 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use strict"

module.exports = {
title: "eslint-utils",
description: "Utilities for ESLint plugins and custom rules.",
Expand Down
File renamed without changes.
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,23 @@
"index.*"
],
"dependencies": {
"eslint-visitor-keys": "^1.0.0"
"eslint-visitor-keys": "^1.1.0"
},
"devDependencies": {
"@mysticatea/eslint-plugin": "^10.0.3",
"codecov": "^3.0.2",
"@mysticatea/eslint-plugin": "^12.0.0",
"codecov": "^3.6.1",
"dot-prop": "^4.2.0",
"eslint": "^5.16.0",
"esm": "^3.0.55",
"espree": "^5.0.1",
"mocha": "^5.2.0",
"eslint": "^6.5.1",
"esm": "^3.2.25",
"espree": "^6.1.1",
"mocha": "^6.2.2",
"npm-run-all": "^4.1.5",
"nyc": "^13.0.1",
"opener": "^1.4.3",
"rimraf": "^2.6.2",
"rollup": "^1.16.7",
"nyc": "^14.1.1",
"opener": "^1.5.1",
"rimraf": "^3.0.0",
"rollup": "^1.25.0",
"rollup-plugin-sourcemaps": "^0.4.2",
"vuepress": "^0.14.4",
"vuepress": "^1.2.0",
"warun": "^1.0.0"
},
"scripts": {
Expand Down
21 changes: 16 additions & 5 deletions src/get-static-value.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
/* globals BigInt */
/* globals BigInt, globalThis, global, self, window */

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

const globalObject =
typeof globalThis !== "undefined"
? globalThis
: typeof self !== "undefined"
? self
: typeof window !== "undefined"
? window
: typeof global !== "undefined"
? global
: {}

const builtinNames = Object.freeze(
new Set([
"Array",
Expand Down Expand Up @@ -76,13 +87,13 @@ const callAllowed = new Set(
Number.parseFloat,
Number.parseInt,
Object,
Object.entries, //eslint-disable-line @mysticatea/node/no-unsupported-features/es-builtins
Object.entries,
Object.is,
Object.isExtensible,
Object.isFrozen,
Object.isSealed,
Object.keys,
Object.values, //eslint-disable-line @mysticatea/node/no-unsupported-features/es-builtins
Object.values,
parseFloat,
parseInt,
RegExp,
Expand Down Expand Up @@ -294,9 +305,9 @@ const operations = Object.freeze({
variable != null &&
variable.defs.length === 0 &&
builtinNames.has(variable.name) &&
variable.name in global
variable.name in globalObject
) {
return { value: global[variable.name] }
return { value: globalObject[variable.name] }
}

// Constants.
Expand Down
10 changes: 5 additions & 5 deletions src/reference-tracker.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,11 @@ export class ReferenceTracker {
esm
? nextTraceMap
: this.mode === "legacy"
? Object.assign(
{ default: nextTraceMap },
nextTraceMap
)
: { default: nextTraceMap }
? Object.assign(
{ default: nextTraceMap },
nextTraceMap
)
: { default: nextTraceMap }
)

if (esm) {
Expand Down
2 changes: 1 addition & 1 deletion test/pattern-matcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { PatternMatcher } from "../src/"

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

0 comments on commit 41ff95e

Please sign in to comment.