Commit 2e7bd9e1 authored by Sophia's avatar Sophia

update eslint configuration

parent c3b781a6
Pipeline #6259 canceled with stages
......@@ -70,48 +70,6 @@
}
],
// Ensure <a> tags are valid
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-is-valid.md
"jsx-a11y/anchor-is-valid": [
"error",
{
"components": ["Link"],
"specialLink": ["href"],
"aspects": ["invalidHref", "preferButton"]
}
],
// Allow .js files to use JSX syntax
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-filename-extension.md
"react/jsx-filename-extension": [1, { "extensions": [".ts", ".tsx"] }],
// Functional and class components are equivalent from React’s point of view
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prefer-stateless-function.md
"react/prefer-stateless-function": "off",
// ESLint plugin for prettier formatting
// https://github.com/prettier/eslint-plugin-prettier
"prettier/prettier": "error",
"react/forbid-prop-types": "off",
"react/destructuring-assignment": "off",
"react/jsx-props-no-spreading": "off",
"react/static-property-placement": "off",
"react/state-in-constructor": "off",
"react/react-in-jsx-scope": "off",
"react/require-default-props": "off",
// TypeScript checks prop-types
"react/prop-types": "off",
// Cannot config .ts, .tsx resolution
"import/no-unresolved": "off",
"import/no-webpack-loader-syntax": "off",
"import/extensions": "off",
"import/prefer-default-export": "off",
"import/order": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"error",
......@@ -124,10 +82,7 @@
],
// Type variables by Codegen can not be camelcase.
"camelcase": "off",
"css-modules/no-undef-class": [2, { "camelCase": true }],
"css-modules/no-unused-class": [2, { "camelCase": true }]
"camelcase": "off"
},
"settings": {
"polyfills": [
......
......@@ -379,6 +379,11 @@ escape-string-regexp@^4.0.0:
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34"
integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==
eslint-config-prettier@^8.3.0:
version "8.3.0"
resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz#f7471b20b6fe8a9a9254cc684454202886a2dd7a"
integrity sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew==
eslint-import-resolver-node@^0.3.6:
version "0.3.6"
resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz#4048b958395da89668252001dbd9eca6b83bacbd"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment