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

Commit

Permalink
feat: improve overrides (#276)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: big change in structure
  • Loading branch information
ykzts authored Sep 1, 2020
1 parent 6c2c3bc commit 1bcfbd3
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 33 deletions.
45 changes: 27 additions & 18 deletions packages/eslint-config-react/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,35 @@
export = {
extends: [
'@inabagumi',
'plugin:react/recommended',
'plugin:jsx-a11y/recommended',
'prettier/react'
],
extends: ['@inabagumi'],
overrides: [
{
files: '*.tsx',
extends: [
'plugin:react/recommended',
'plugin:jsx-a11y/recommended',
'prettier/react'
],
files: ['*.jsx', '*.tsx'],
plugins: ['react-hooks'],
rules: {
'react-hooks/exhaustive-deps': 'error',
'react-hooks/rules-of-hooks': 'error'
},
settings: {
react: {
version: 'detect'
}
}
},
{
extends: [
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'prettier/@typescript-eslint'
],
files: ['*.tsx'],
rules: {
'react/prop-types': 'off'
}
}
],
plugins: ['react-hooks'],
rules: {
'react-hooks/exhaustive-deps': 'error',
'react-hooks/rules-of-hooks': 'error'
},
settings: {
react: {
version: 'detect'
}
}
]
}
11 changes: 8 additions & 3 deletions packages/eslint-config-vue/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
export = {
extends: ['@inabagumi', 'plugin:vue/essential', 'prettier/vue'],
parserOptions: {
parser: '@typescript-eslint/parser'
}
overrides: [
{
files: ['*.ts', '*.vue'],
parserOptions: {
parser: '@typescript-eslint/parser'
}
}
]
}
20 changes: 8 additions & 12 deletions packages/eslint-config/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,16 @@ export = {
browser: true,
node: true
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
'prettier/@typescript-eslint'
],
extends: ['eslint:recommended', 'prettier'],
overrides: [
{
files: ['gatsby-*.js', 'next.config.js'],
rules: {
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-var-requires': 'off'
}
extends: [
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'prettier/@typescript-eslint'
],
files: ['*.ts']
}
],
parserOptions: {
Expand Down

0 comments on commit 1bcfbd3

Please sign in to comment.