diff --git a/.editorconfig b/.editorconfig index 25f14388f..61039e4d6 100644 --- a/.editorconfig +++ b/.editorconfig @@ -11,9 +11,7 @@ indent_style = space indent_size = 4 trim_trailing_whitespace = true -# Matches the exact files either package.json or .travis.yml -# and all Markdown files -[{package.json,.travis.yml,*.md}] +[*.{json,yml,md}] indent_size = 2 ; Needed if doing `git add --patch` to edit patches diff --git a/package.json b/package.json index 9511c4d17..578fc4d51 100644 --- a/package.json +++ b/package.json @@ -24,9 +24,8 @@ "test": "run-s test-node test-headless test-webworker test-es-module", "check-dependencies": "dependency-check package.json --unused --no-dev --ignore-module coveralls --ignore-module @std/esm", "build": "node ./build.js", - "lint": "run-p lint-js lint-mjs lint-markdown", - "lint-js": "eslint .", - "lint-mjs": "eslint --ext mjs --parser-options=sourceType:module test/es2015", + "lint": "run-p lint-js lint-markdown", + "lint-js": "eslint '**/*.{js,mjs}'", "lint-markdown": "find docs -type f -name '*.md' ! -name 'changelog.md' | xargs markdownlint", "precommit": "lint-staged", "pretest-webworker": "npm run build", diff --git a/test/es2015/.eslintrc.yml b/test/es2015/.eslintrc.yml new file mode 100644 index 000000000..add5a7856 --- /dev/null +++ b/test/es2015/.eslintrc.yml @@ -0,0 +1,2 @@ +parserOptions: + sourceType: module