Skip to content

Commit

Permalink
Restrore Eslint 8.21.0
Browse files Browse the repository at this point in the history
  • Loading branch information
vrigal committed Jul 2, 2024
1 parent 80c9e1a commit b4a413a
Show file tree
Hide file tree
Showing 6 changed files with 548 additions and 676 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ui/glean/generated/*.js
65 changes: 65 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
module.exports = {
root: true,
extends: [
'eslint-config-airbnb',
// We use Prettier instead of AirBnb for style-related rules (see .prettierrc.js).
'plugin:prettier/recommended',
// Disable React-related AirBnB style rules.
'prettier',
'plugin:jest/recommended',
'plugin:jest/style',
],
parser: '@babel/eslint-parser',
settings: {
react: {
version: '16.6',
},
},
env: {
browser: true,
},
globals: {
page: true,
browser: true,
jestPuppeteer: true,
},
rules: {
'class-methods-use-this': 'off',
'consistent-return': 'off',
'default-case': 'off',
'default-param-last': 'off',
'import/extensions': 'off',
'jsx-a11y/click-events-have-key-events': 'off',
'no-alert': 'off',
'no-continue': 'off',
'no-param-reassign': 'off',
'no-plusplus': 'off',
'no-restricted-syntax': 'off',
'no-shadow': 'off',
'no-underscore-dangle': 'off',
'prefer-promise-reject-errors': 'off',
'react/destructuring-assignment': 'off',
'react/function-component-definition': 'off',
'react/jsx-fragments': 'off',
'react/jsx-no-constructed-context-values': 'off',
'react/jsx-no-script-url': 'off',
'react/jsx-no-useless-fragment': 'off',
'react/jsx-props-no-spreading': 'off',
'react/no-arrow-function-lifecycle': 'off',
'react/no-invalid-html-attribute': 'off',
'react/no-namespace': 'off',
'react/no-unstable-nested-components': 'off',
'react/no-unused-class-component-methods': 'off',
'react/prefer-exact-props': 'off',
'react/prop-types': 'off',
'react/sort-comp': [0, {}],
// Override AirBnB's config for this rule to make it more strict.
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/order.md
'import/order': [
'error',
{
'newlines-between': 'always',
},
],
},
};
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ repos:
hooks:
- id: shellcheck
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.5.0
rev: v2.2.1
hooks:
- id: prettier
- repo: https://github.com/igorshubovych/markdownlint-cli
Expand Down
76 changes: 0 additions & 76 deletions eslint.config.mjs

This file was deleted.

27 changes: 14 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
},
"devDependencies": {
"@babel/core": "7.24.7",
"@babel/eslint-parser": "7.24.7",
"@babel/eslint-parser": "7.22.15",
"@babel/plugin-proposal-class-properties": "7.17.12",
"@babel/plugin-syntax-dynamic-import": "7.8.3",
"@babel/preset-env": "7.24.7",
Expand All @@ -86,19 +86,20 @@
"@pollyjs/adapter-puppeteer": "5.1.1",
"@pollyjs/core": "5.1.1",
"@pollyjs/persister-fs": "6.0.6",
"@testing-library/dom": "10.1.0",
"@testing-library/jest-dom": "6.4.6",
"@testing-library/react": "16.0.0",
"@testing-library/jest-dom": "6.1.6",
"@testing-library/react": "12.0.0",
"babel-loader": "9.1.3",
"clean-webpack-plugin": "4.0.0",
"copy-webpack-plugin": "12.0.2",
"css-loader": "7.1.2",
"eslint": "9.5.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-jest": "28.6.0",
"eslint-plugin-jsx-a11y": "6.9.0",
"eslint-plugin-prettier": "5.1.3",
"eslint-plugin-react": "7.34.3",
"eslint": "8.21.0",
"eslint-config-airbnb": "19.0.4",
"eslint-config-prettier": "9.0.0",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-jest": "27.1.7",
"eslint-plugin-jsx-a11y": "6.2.3",
"eslint-plugin-prettier": "4.2.1",
"eslint-plugin-react": "7.16.0",
"fetch-mock": "9.4.0",
"html-loader": "4.2.0",
"html-webpack-plugin": "5.5.4",
Expand All @@ -108,7 +109,7 @@
"markdownlint-cli": "0.32.2",
"mini-css-extract-plugin": "2.6.1",
"path": "0.12.7",
"prettier": "3.0.0",
"prettier": "2.0.5",
"puppeteer": "21.10.0",
"setup-polly-jest": "0.9.1",
"style-loader": "3.3.4",
Expand All @@ -123,8 +124,8 @@
"build:glean": "node ./node_modules/@mozilla/glean/dist/cli/cli.js translate ui/glean/metrics.yaml ui/glean/pings.yaml -f javascript -o ui/glean/generated",
"format": "node ./node_modules/prettier/bin-prettier.js --write \"**/*.{css,html,js,jsx,json,md,yaml,yml}\"",
"format:check": "node ./node_modules/prettier/bin-prettier.js --check \"**/*.{css,html,js,jsx,json,md,yaml,yml}\"",
"lint": "node ./node_modules/eslint/bin/eslint.js --report-unused-disable-directives --max-warnings 0 --format codeframe ui/ tests/ui/",
"lint-with-cache": "node ./node_modules/eslint/bin/eslint.js --cache --report-unused-disable-directives --max-warnings 0 --format codeframe ui/ tests/ui/",
"lint": "node ./node_modules/eslint/bin/eslint.js --report-unused-disable-directives --max-warnings 0 --format codeframe --ext js,jsx \".*.js\" \"*.js\" ui/ tests/ui/",
"lint-with-cache": "node ./node_modules/eslint/bin/eslint.js --cache --report-unused-disable-directives --max-warnings 0 --format codeframe --ext js,jsx \".*.js\" \"*.js\" ui/ tests/ui/",
"lint:glean": "node ./node_modules/@mozilla/glean/dist/cli/cli.js glinter ui/glean/metrics.yaml ui/glean/pings.yaml",
"markdownlint": "node ./node_modules/markdownlint-cli/markdownlint.js -c .markdownlint.json -p .markdownlintignore .",
"prettier": "npx prettier --check .",
Expand Down
Loading

0 comments on commit b4a413a

Please sign in to comment.