Fix some PHPstorm nightmare
This commit is contained in:
parent
b95e40f298
commit
0260efc966
2 changed files with 2 additions and 0 deletions
89
.eslintrc.yml
Normal file
89
.eslintrc.yml
Normal file
|
@ -0,0 +1,89 @@
|
|||
parser: "@typescript-eslint/parser"
|
||||
parserOptions:
|
||||
ecmaVersion: 6
|
||||
ecmaFeatures:
|
||||
jsx: true
|
||||
project: "./tsconfig.json"
|
||||
tsconfigRootDir: "./"
|
||||
settings:
|
||||
react:
|
||||
pragma: "React"
|
||||
version: "detect"
|
||||
linkComponents:
|
||||
- name: Link
|
||||
linkAttribute: to
|
||||
- name: NavLink
|
||||
linkAttribute: to
|
||||
env:
|
||||
browser: true
|
||||
es6: true
|
||||
plugins:
|
||||
- "react"
|
||||
- "react-hooks"
|
||||
- "@typescript-eslint"
|
||||
extends:
|
||||
- "standard"
|
||||
- "plugin:react/recommended"
|
||||
- "plugin:@typescript-eslint/recommended"
|
||||
rules:
|
||||
quotes:
|
||||
- warn
|
||||
- single
|
||||
indent:
|
||||
- warn
|
||||
- 4
|
||||
- SwitchCase: 1
|
||||
semi:
|
||||
- warn
|
||||
- always
|
||||
comma-dangle:
|
||||
- warn
|
||||
- always-multiline
|
||||
spaced-comment:
|
||||
- warn
|
||||
array-bracket-spacing:
|
||||
- warn
|
||||
- always
|
||||
"react-hooks/rules-of-hooks":
|
||||
- error
|
||||
"react-hooks/exhaustive-deps": 0
|
||||
"@typescript-eslint/explicit-function-return-type": 0
|
||||
"@typescript-eslint/explicit-member-accessibility": 0
|
||||
"@typescript-eslint/ban-ts-ignore": 0
|
||||
"@typescript-eslint/no-explicit-any": 0
|
||||
"@typescript-eslint/no-non-null-assertion": 0
|
||||
"@typescript-eslint/ban-ts-comment": 0
|
||||
# This would be nice to have, but don't want to deal with the warning spam at the moment.
|
||||
"@typescript-eslint/explicit-module-boundary-types": 0
|
||||
no-restricted-imports:
|
||||
- error
|
||||
- paths:
|
||||
- name: styled-components
|
||||
message: Please import from styled-components/macro.
|
||||
patterns:
|
||||
- "!styled-components/macro"
|
||||
# Not sure, this rule just doesn't work right and is protected by our use of Typescript anyways
|
||||
# so I'm just not going to worry about it.
|
||||
"react/prop-types": 0
|
||||
"react/display-name": 0
|
||||
"react/jsx-indent-props":
|
||||
- warn
|
||||
- 4
|
||||
"react/jsx-boolean-value":
|
||||
- warn
|
||||
- never
|
||||
"react/jsx-closing-bracket-location":
|
||||
- 1
|
||||
- "line-aligned"
|
||||
"react/jsx-closing-tag-location": 1
|
||||
overrides:
|
||||
- files:
|
||||
- "**/*.tsx"
|
||||
rules:
|
||||
operator-linebreak:
|
||||
- error
|
||||
- before
|
||||
- overrides:
|
||||
"&&": "after"
|
||||
"?": "ignore"
|
||||
":": "ignore"
|
Loading…
Add table
Add a link
Reference in a new issue