Skip to content

Instantly share code, notes, and snippets.

@whb07
Created August 3, 2020 13:03
Show Gist options
  • Save whb07/5edc3853dd21e10427c82a0d07ecff15 to your computer and use it in GitHub Desktop.
Save whb07/5edc3853dd21e10427c82a0d07ecff15 to your computer and use it in GitHub Desktop.
solid all around eslint with TS + react
{
"env": {
"browser": true,
"es6": true
},
"extends": [
"react-app",
"plugin:react/recommended",
"airbnb"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": [
"react",
"@typescript-eslint"
],
"rules": {
"@typescript-eslint/no-explicit-any": "error",
"max-len": ["error", { "code": 140, "tabWidth": 4 }],
"semi":["error", "never"],
"quotes": ["error", "single"],
"indent": ["error", 4, { "SwitchCase": 1 }],
"react/jsx-indent": ["error", 4],
"react/jsx-indent-props": ["error", 4],
"react/jsx-filename-extension": ["error", { "extensions": [".js", ".jsx", ".tsx", ".ts"] }],
"import/extensions": [
"error",
"ignorePackages",
{
"js": "never",
"jsx": "never",
"ts": "never",
"tsx": "never"
}
]
},
"settings": {
"import/resolver": {
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx"]
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment