80 lines
1.8 KiB
JavaScript
80 lines
1.8 KiB
JavaScript
module.exports = {
|
|
parser: "@typescript-eslint/parser",
|
|
parserOptions: {
|
|
ecmaVersion: 2020,
|
|
sourceType: "module",
|
|
ecmaFeatures: {
|
|
jsx: true,
|
|
},
|
|
project: "./tsconfig.json",
|
|
},
|
|
settings: {
|
|
react: {
|
|
version: "detect",
|
|
},
|
|
"import/resolver": {
|
|
typescript: {
|
|
project: "./tsconfig.json",
|
|
},
|
|
alias: {
|
|
map: [
|
|
["@", "./resources/ts"],
|
|
["&", "./resources/assets"],
|
|
],
|
|
extensions: [".ts", ".tsx", ".js", ".jsx"],
|
|
},
|
|
},
|
|
},
|
|
env: {
|
|
browser: true,
|
|
es2021: true,
|
|
node: true,
|
|
},
|
|
ignorePatterns: ["resources/ts/components/ui/**"],
|
|
extends: [
|
|
"eslint:recommended",
|
|
"plugin:react/recommended",
|
|
"plugin:react-hooks/recommended",
|
|
"plugin:@typescript-eslint/recommended",
|
|
"plugin:prettier/recommended",
|
|
],
|
|
plugins: ["react", "react-hooks", "@typescript-eslint", "import", "prettier"],
|
|
rules: {
|
|
"no-undef": "off",
|
|
"react/display-name": "off",
|
|
"react/jsx-key": "off",
|
|
"react/jsx-filename-extension": ["error", { extensions: [".tsx", ".jsx"] }],
|
|
"react/react-in-jsx-scope": "off",
|
|
"react/prop-types": "off",
|
|
"react/require-default-props": "off",
|
|
"import/extensions": [
|
|
"error",
|
|
"ignorePackages",
|
|
{
|
|
ts: "never",
|
|
tsx: "never",
|
|
js: "never",
|
|
jsx: "never",
|
|
},
|
|
],
|
|
"import/order": "off",
|
|
"prettier/prettier": "error",
|
|
"no-unused-vars": "off",
|
|
"@typescript-eslint/no-unused-vars": [
|
|
"error",
|
|
{
|
|
argsIgnorePattern: "^_",
|
|
varsIgnorePattern: "^_",
|
|
caughtErrorsIgnorePattern: "^_",
|
|
destructuredArrayIgnorePattern: "^_",
|
|
ignoreRestSiblings: true,
|
|
},
|
|
],
|
|
"no-console": [
|
|
"warn",
|
|
{
|
|
allow: ["warn", "error"],
|
|
},
|
|
],
|
|
},
|
|
};
|