Skip to content

Commit

Permalink
switched to new eslint config format
Browse files Browse the repository at this point in the history
  • Loading branch information
cockroacher committed Mar 1, 2025
1 parent e8cc4fc commit d7ea04b
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 23 deletions.
22 changes: 0 additions & 22 deletions defaults/js-eslint-standard.json

This file was deleted.

29 changes: 29 additions & 0 deletions defaults/js-eslint-standard.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import globals from "globals";

export default [{
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},

ecmaVersion: "latest",
sourceType: "module",
},

rules: {
"no-console": "error",
"no-undef": "error",
"no-unused-vars": ["error", {
vars: "all",
args: "after-used",
ignoreRestSiblings: false,
}],
eqeqeq: ["error", "always"],
semi: "off",
quotes: "off",
indent: "off",
"comma-dangle": "off",
"space-before-function-paren": "off",
},
}];
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"sitespeed.io": "36.4.1",
"stylelint": "16.14.1",
"eslint": "9.21.0",
"globals": "14.0.0",
"vnu-jar": "23.4.11",
"webperf-sitespeedio-plugin": "2025.2.0",
"yellowlabtools": "3.0.1"
Expand Down
2 changes: 1 addition & 1 deletion tests/lint_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def get_errors(test_type, params):
f"node node_modules{os.path.sep}stylelint{os.path.sep}bin"
f"{os.path.sep}stylelint.mjs {arg}")
elif is_js:
config_file_path = os.path.join(base_directory, "defaults", "js-eslint-standard.json")
config_file_path = os.path.join(base_directory, "defaults", "js-eslint-standard.mjs")
arg = f'{file_path} -f json -o {lint_file_path} --config {config_file_path} --quiet'
command = (
f"node node_modules{os.path.sep}eslint{os.path.sep}bin"
Expand Down

0 comments on commit d7ea04b

Please sign in to comment.