-
Notifications
You must be signed in to change notification settings - Fork 798
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update babel-eslint → @babel/eslint-parser (#20085)
- Loading branch information
Showing
29 changed files
with
458 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// eslint config for react-using projects. Extend this instead of .eslintrc.js, probably like this: | ||
// | ||
// ``` | ||
// module.exports = { | ||
// // This project uses react, so load the shared react config. | ||
// root: true, | ||
// extends: [ '../../../.eslintrc.react.js' ], | ||
// parserOptions: { | ||
// babelOptions: { | ||
// configFile: require.resolve( './babel.config.js' ), | ||
// }, | ||
// }, | ||
// }; | ||
// ``` | ||
|
||
module.exports = { | ||
root: true, | ||
parser: '@babel/eslint-parser', | ||
extends: [ 'wpcalypso/react', './.eslintrc.js' ], | ||
parserOptions: { | ||
requireConfigFile: true, | ||
}, | ||
settings: { | ||
react: { | ||
version: 'detect', // React version. "detect" automatically picks the version you have installed. | ||
}, | ||
}, | ||
rules: { | ||
'react/jsx-curly-spacing': [ 2, 'always' ], | ||
'react/jsx-no-bind': 2, | ||
// 'react/jsx-space-before-closing': 2, | ||
'react/jsx-tag-spacing': [ 2, { beforeSelfClosing: 'always' } ], | ||
'react/no-danger': 2, | ||
'react/no-did-mount-set-state': 2, | ||
'react/no-did-update-set-state': 2, | ||
'react/no-is-mounted': 2, | ||
'react/prefer-es6-class': 1, | ||
'react/no-string-refs': 0, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
save-exact = true | ||
prefer-workspace-packages = true | ||
|
||
# Default, minus eslint. | ||
public-hoist-pattern=['*types*', '@prettier/plugin-*', '*prettier-plugin-*'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,13 +62,13 @@ | |
"docker:wp": "printf '\\e[30;43m`pnpm run docker:wp` is deprected. Use the Jetpack CLI instead.\\e[0m\\n'; jetpack docker wp", | ||
"install-if-deps-outdated": "pnpm install --no-prod --frozen-lockfile", | ||
"lint": "pnpm run lint-file -- .", | ||
"lint-changed": "eslint-changed --ext .js,.jsx --git", | ||
"lint-file": "eslint --ext .js,.jsx", | ||
"lint-changed": "eslint-changed --ext .js,.jsx,.cjs --git", | ||
"lint-file": "eslint --ext .js,.jsx,.cjs", | ||
"lint-required": "node -e \"const fs = require('fs'); fs.copyFileSync('.eslintignore','.eslintignore-required'); const w=fs.createWriteStream('.eslintignore-required',{flags:'a'}); w.write('\\n# tools/eslint-excludelist.json\\n'); w.end(JSON.parse(fs.readFileSync('tools/eslint-excludelist.json','utf8')).join('\\n')+'\\n')\" && pnpm run lint -- --max-warnings=0 --ignore-path .eslintignore-required", | ||
"php:autofix": "composer phpcs:fix", | ||
"php:compatibility": "composer phpcs:compatibility", | ||
"php:lint": "composer phpcs:lint", | ||
"reformat-files": "prettier --ignore-path .eslintignore --write \"**/*.{js,jsx,json}\"", | ||
"reformat-files": "prettier --ignore-path .eslintignore --write \"**/*.{js,jsx,cjs,json}\"", | ||
"validate-es5": "pnpx eslint --parser-options=ecmaVersion:5 --no-eslintrc --no-ignore", | ||
"version-packages": "bash ./tools/version-packages.sh" | ||
}, | ||
|
@@ -84,25 +84,10 @@ | |
"chalk": "4.1.1" | ||
}, | ||
"devDependencies": { | ||
"@automattic/eslint-changed": "workspace:1.0.1-alpha", | ||
"@wordpress/eslint-plugin": "7.4.0", | ||
"babel-eslint": "10.1.0", | ||
"eslint": "7.25.0", | ||
"eslint-config-prettier": "8.3.0", | ||
"eslint-config-wpcalypso": "6.1.0", | ||
"eslint-loader": "4.0.2", | ||
"eslint-plugin-es5": "1.5.0", | ||
"eslint-plugin-inclusive-language": "1.2.1", | ||
"eslint-plugin-jest": "24.3.6", | ||
"eslint-plugin-jsdoc": "32.3.3", | ||
"eslint-plugin-jsx-a11y": "6.4.1", | ||
"eslint-plugin-lodash": "7.2.0", | ||
"eslint-plugin-prettier": "3.4.0", | ||
"eslint-plugin-react": "7.23.2", | ||
"eslint-plugin-wpcalypso": "5.0.0", | ||
"glob": "7.1.6", | ||
"husky": "4.3.8", | ||
"jetpack-cli": "workspace:1.0.0", | ||
"jetpack-eslint": "workspace:*", | ||
"parse-diff": "0.8.1", | ||
"prettier": "npm:[email protected]", | ||
"semver": "7.3.5", | ||
|
Oops, something went wrong.