Skip to content

Instantly share code, notes, and snippets.

@ipiranhaa
Last active October 10, 2022 04:23
Show Gist options
  • Save ipiranhaa/5d4657ed398a9e0ff6e7dac961f0ca2c to your computer and use it in GitHub Desktop.
Save ipiranhaa/5d4657ed398a9e0ff6e7dac961f0ca2c to your computer and use it in GitHub Desktop.
The ESlint configuration for React project
{
"env": {
"es6": true,
"browser": true,
"jest": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"sourceType": "module"
},
"extends": [
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:jsx-a11y/recommended",
"airbnb",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:jest/recommended",
"plugin:playwright/playwright-test",
"prettier"
],
"rules": {
"no-console": "off",
"no-redeclare": "error",
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": "error",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/explicit-module-boundary-types": "off",
"import/order": [
"error",
{
"groups": ["builtin", "external", "sibling", "parent", "index"],
"newlines-between": "always"
}
]
},
"overrides": [
{
"files": ["**/*.stories.*"],
"rules": {
"import/no-anonymous-default-export": "off"
}
},
{
"files": ["playwright/**/*.integration.ts"],
"rules": {
"jest/no-done-callback": "off",
"jest/no-standalone-expect": "off"
}
},
{
"files": ["**/*.spec.*"],
"rules": {
"playwright/missing-playwright-await": "off"
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment