Update eslint configuration
This commit is contained in:
parent
dd0222fb19
commit
42a2dced76
|
@ -1,3 +1,6 @@
|
|||
// Implements WordPress JS Coding Standards
|
||||
// https://developer.wordpress.org/coding-standards/wordpress-coding-standards/javascript/
|
||||
|
||||
{
|
||||
"root": true,
|
||||
"parser": "@typescript-eslint/parser",
|
||||
|
@ -10,7 +13,8 @@
|
|||
"extends": [
|
||||
"plugin:react/recommended",
|
||||
"plugin:jsx-a11y/recommended",
|
||||
"plugin:jest/recommended"
|
||||
"plugin:jest/recommended",
|
||||
"plugin:@typescript-eslint/recommended"
|
||||
],
|
||||
"env": {
|
||||
"browser": false,
|
||||
|
@ -142,13 +146,15 @@
|
|||
"message": "Translate function arguments must be string literals."
|
||||
}
|
||||
],
|
||||
"no-shadow": "error",
|
||||
"no-shadow": "off",
|
||||
"@typescript-eslint/no-shadow": ["error"],
|
||||
"no-undef": "error",
|
||||
"no-undef-init": "error",
|
||||
"no-unreachable": "error",
|
||||
"no-unsafe-negation": "error",
|
||||
"no-unused-expressions": "error",
|
||||
"no-unused-vars": "error",
|
||||
"no-unused-vars": "off",
|
||||
"@typescript-eslint/no-unused-vars": ["error"],
|
||||
"no-useless-computed-key": "error",
|
||||
"no-useless-constructor": "error",
|
||||
"no-useless-return": "error",
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
"private": true,
|
||||
"main": "src/blocks.ts",
|
||||
"scripts": {
|
||||
"lint:js": "wp-scripts lint-js 'src/**/*{.js,.jsx,.ts,.tsx}'",
|
||||
"build:js": "webpack --mode=production",
|
||||
"build:sass": "sass src/styles:dist",
|
||||
"build": "npm run build:js && npm run build:sass",
|
||||
|
|
Loading…
Reference in New Issue