Files
cunningham/packages/eslint-config-custom/.eslintrc.json
Anthony Le Courric e251bbb438 🚨(eslint-config-custom) prob order with windows
With Windows the order of the imports was not the same as with Linux,
this was causing the linter to fail with CI.
We force the import starting with ":" to the internal group to fix this
issue.
2023-09-11 16:15:13 +02:00

112 lines
3.2 KiB
JSON

{
"env": {
"browser": true,
"jest": true,
"es6": true
},
"extends": [
"airbnb",
"airbnb-typescript",
"plugin:compat/recommended",
"plugin:prettier/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
/*
To use eslint with VSCode and see lint error directly in file,
you have to install dbaeumer.vscode-eslint extension
and you may have to tweak your workspace settings with:
"eslint.workingDirectories": ["src/frontend"]
As frontend is not at the root of the repository,
this setting allows ESLint extension to find the ./tsconfig.json file
*/
"project": "./tsconfig.json",
"ecmaFeatures": {
"jsx": true
}
},
"plugins": ["formatjs", "@typescript-eslint", "import"],
/* Disable some rules to be iso with tslint which was previously used */
"rules": {
"@typescript-eslint/explicit-member-accessibility": [
"error",
{ "accessibility": "no-public" }
],
"@typescript-eslint/lines-between-class-members": "off",
"@typescript-eslint/no-use-before-define": "off",
"arrow-parens": "error",
"consistent-return": "off",
"default-case": "off",
"formatjs/no-multiple-whitespaces": "error",
"formatjs/enforce-description": "error",
"formatjs/enforce-default-message": "error",
"global-require": "off",
"import/extensions": "off",
"import/no-cycle": ["off"],
"import/no-dynamic-require": "off",
"import/order": [
"error",
{
"groups": [
"builtin",
"external",
"internal",
"parent",
"sibling",
"index"
],
"alphabetize": { "order": "ignore" },
"pathGroups": [
{
"pattern": "+(:)/**",
"group": "internal"
}
]
}
],
"import/prefer-default-export": "off",
"jsx-a11y/click-events-have-key-events": "off",
"jsx-a11y/label-has-associated-control": "warn",
"no-console": ["error", { "allow": ["warn"] }],
"no-else-return": "off",
"no-empty-function": "off",
"no-nested-ternary": "warn",
"no-param-reassign": "off",
"no-plusplus": "off",
"no-promise-executor-return": "off",
"no-prototype-builtins": "off",
"no-return-assign": "off",
"no-return-await": "off",
"no-undef": "off",
"no-underscore-dangle": "off",
"no-useless-escape": "off",
"prefer-template": "off",
"react/button-has-type": "off",
"react/destructuring-assignment": "off",
"react/function-component-definition": [
"error",
{
"namedComponents": "arrow-function",
"unnamedComponents": "arrow-function"
}
],
"react/jsx-boolean-value": "off",
"react/jsx-fragments": "off",
"react/jsx-props-no-spreading": "off",
"react/jsx-uses-react": "off",
"react/no-array-index-key": "warn",
"react/prop-types": "off",
"react/react-in-jsx-scope": "off",
"react/require-default-props": "off",
"react/style-prop-object": ["error", { "allow": ["FormattedNumber"] }]
},
"settings": {
"polyfills": ["fetch", "Promise"],
"import/resolver": {
"typescript": true
}
},
"ignorePatterns": ["node_modules/", "dist/"]
}