Skip to content
This repository has been archived by the owner on Nov 9, 2021. It is now read-only.

Commit

Permalink
chore(eslint): improve config
Browse files Browse the repository at this point in the history
  • Loading branch information
wtchnm committed Jan 27, 2021
1 parent 25d23a9 commit 1bebc3d
Show file tree
Hide file tree
Showing 3 changed files with 188 additions and 48 deletions.
63 changes: 30 additions & 33 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{
"parserOptions": {
"ecmaVersion": 11
},
"root": true,
"extends": [
"eslint:recommended",
"plugin:import/warnings",
"plugin:import/errors",
"eslint-config-airbnb-base",
"plugin:unicorn/recommended",
"prettier",
"prettier/unicorn"
],
"overrides": [
{
"files": ["rollup.config.js"],
"parserOptions": {
"sourceType": "module"
}
},
{
"files": ["*.ts", "*.tsx"],
"parser": "@typescript-eslint/parser",
Expand All @@ -17,48 +18,44 @@
},
"extends": [
"eslint:recommended",
"plugin:import/warnings",
"plugin:import/errors",
"plugin:import/typescript",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:jsx-a11y/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"airbnb",
"airbnb/hooks",
"plugin:import/typescript",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"airbnb-typescript",
"airbnb/hooks",
"plugin:unicorn/recommended",
"prettier",
"prettier/@typescript-eslint",
"prettier/react"
"prettier/react",
"prettier/unicorn"
],
"rules": {
"import/namespace": "off",
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": ["stories/**", "rollup.config.js"],
"optionalDependencies": false,
"peerDependencies": true,
"bundledDependencies": false
"devDependencies": ["stories/**"],
"optionalDependencies": false
}
],

"no-void": ["error", { "allowAsStatement": true }],
"react/prop-types": "off",
"react/require-default-props": "off",

"react/jsx-filename-extension": [1, { "extensions": [".tsx"] }],
"react/jsx-one-expression-per-line": 0,
"react/prop-types": 0,
"react/require-default-props": 0,

"import/extensions": [
1,
"unicorn/filename-case": [
"error",
{
"ts": "never"
"cases": {
"camelCase": true,
"pascalCase": true
}
}
],
"import/named": 0,
"import/namespace": 0,
"import/default": 0,
"import/no-named-as-default-member": 0
]
}
}
]
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,13 @@
"cssnano": "4.1.10",
"cz-conventional-changelog": "3.3.0",
"eslint": "7.18.0",
"eslint-config-airbnb": "18.2.1",
"eslint-config-airbnb-typescript": "12.0.0",
"eslint-config-prettier": "7.2.0",
"eslint-plugin-import": "2.22.1",
"eslint-plugin-jsx-a11y": "6.4.1",
"eslint-plugin-react": "7.22.0",
"eslint-plugin-react-hooks": "4.2.0",
"eslint-plugin-unicorn": "27.0.0",
"jest": "26.6.3",
"postcss": "7.0.35",
"postcss-loader": "4.1.0",
Expand Down
Loading

0 comments on commit 1bebc3d

Please sign in to comment.