-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: use external eslint, prettier configs
- Loading branch information
1 parent
6dad8e6
commit 27f729c
Showing
6 changed files
with
56 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,98 +1,3 @@ | ||
module.exports = { | ||
env: { | ||
browser: true, | ||
es6: true, | ||
node: true, | ||
}, | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:react/recommended', | ||
'plugin:react-hooks/recommended', | ||
'plugin:react/jsx-runtime', | ||
'prettier', | ||
'plugin:storybook/recommended', | ||
], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
ecmaVersion: 'latest', | ||
sourceType: 'module', | ||
}, | ||
plugins: [ | ||
'react', | ||
'@typescript-eslint', | ||
'eslint-plugin-react-hooks', | ||
'i18next', | ||
'unused-imports', | ||
'simple-import-sort', | ||
'eslint-plugin-import', | ||
], | ||
root: true, | ||
rules: { | ||
curly: 'error', | ||
'i18next/no-literal-string': 'warn', | ||
'react/jsx-no-bind': ['error', { allowBind: true }], | ||
'react/jsx-curly-brace-presence': ['error', { props: 'never', children: 'never' }], | ||
'react-hooks/exhaustive-deps': 'error', | ||
'no-var': 'error', | ||
'brace-style': 'error', | ||
'prefer-template': 'error', | ||
'import/no-duplicates': 'error', | ||
radix: 'error', | ||
'space-before-blocks': 'error', | ||
'import/prefer-default-export': 'off', | ||
'@typescript-eslint/no-unused-vars': 'off', | ||
'unused-imports/no-unused-imports': 'error', | ||
'unused-imports/no-unused-vars': [ | ||
'warn', | ||
{ | ||
vars: 'all', | ||
varsIgnorePattern: '^_', | ||
args: 'after-used', | ||
argsIgnorePattern: '^_', | ||
}, | ||
], | ||
'@typescript-eslint/ban-ts-comment': 'warn', | ||
'@typescript-eslint/no-explicit-any': 'warn', | ||
'@typescript-eslint/no-empty-interface': [ | ||
'error', | ||
{ | ||
allowSingleExtends: true, | ||
}, | ||
], | ||
'@typescript-eslint/consistent-type-imports': [ | ||
'error', | ||
{ | ||
prefer: 'type-imports', | ||
fixStyle: 'separate-type-imports', | ||
disallowTypeAnnotations: true, | ||
}, | ||
], | ||
'@typescript-eslint/no-import-type-side-effects': 'error', | ||
'simple-import-sort/imports': 'error', | ||
'simple-import-sort/exports': 'error', | ||
'no-restricted-syntax': [ | ||
'error', | ||
{ | ||
message: 'React\'s `memo` strips types from generic components. Use `typedMemo` instead.', | ||
selector: 'CallExpression[callee.name="memo"]', | ||
}, | ||
], | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['*.stories.tsx'], | ||
rules: { | ||
'i18next/no-literal-string': 'off', | ||
}, | ||
}, | ||
], | ||
settings: { | ||
react: { | ||
version: 'detect', | ||
}, | ||
}, | ||
extends: ['@invoke-ai/eslint-config-react'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
auto-install-peers=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,3 @@ | ||
module.exports = { | ||
trailingComma: 'es5', | ||
printWidth: 120, | ||
tabWidth: 2, | ||
semi: true, | ||
singleQuote: true, | ||
endOfLine: 'auto', | ||
...require('@invoke-ai/prettier-config-react'), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.