diff --git a/.eslintrc.js b/.eslintrc.js index dc9cb6c3da..4e01bf55a7 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -30,14 +30,5 @@ module.exports = { argsIgnorePattern: '^_' // ignore unused variables whose name is '_' } ] - }, - - overrides: [ - { - files: 'test/**/*.js', - env: { - jest: true - } - } - ] + } } diff --git a/package.json b/package.json index 3f59918dd7..a420204899 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "clean": "rimraf lib dist es coverage", "format": "prettier --write \"{src,test}/**/*.{js,ts}\" index.d.ts \"**/*.md\"", "format:check": "prettier --list-different \"{src,test}/**/*.{js,ts}\" index.d.ts \"**/*.md\"", - "lint": "eslint src test", + "lint": "eslint --ext js,ts src test", "pretest": "npm run build", "test": "jest", "test:watch": "npm test -- --watch", @@ -46,7 +46,7 @@ "build": "rollup -c", "prepare": "npm run clean && npm run check-types && npm run format:check && npm run lint && npm test", "check-types": "tsc", - "examples:lint": "eslint examples", + "examples:lint": "eslint --ext js,ts examples", "examples:test": "cross-env CI=true babel-node examples/testAll.js" }, "dependencies": { diff --git a/test/typescript/.eslintrc.js b/test/typescript/.eslintrc.js new file mode 100644 index 0000000000..d94f0a7925 --- /dev/null +++ b/test/typescript/.eslintrc.js @@ -0,0 +1,7 @@ +module.exports = { + rules: { + 'no-unused-expressions': 'off', + '@typescript-eslint/no-namespace': 'off', + '@typescript-eslint/no-unused-vars': 'off' + } +}