Skip to content

Instantly share code, notes, and snippets.

@kvedantmahajan
Last active July 12, 2021 13:39
Show Gist options
  • Save kvedantmahajan/d675b0ee68aaaf38ee6c56cd04d5638f to your computer and use it in GitHub Desktop.
Save kvedantmahajan/d675b0ee68aaaf38ee6c56cd04d5638f to your computer and use it in GitHub Desktop.
.eslintrc
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"sourceType": "module",
"project": "./tsconfig.json"
},
"plugins": [
"react",
"prettier",
"@typescript-eslint"
],
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"prettier",
"prettier/@typescript-eslint"
],
"env": {
"browser": true,
"jasmine": true,
"jest": true,
"node": true
},
"rules": {
"prettier/prettier": [
"error",
{
"jsx-max-props-per-line": 1,
"useTabs": true,
"tabWidth": 4
}
],
"no-case-declarations": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
"vars": "all",
"args": "all",
"ignoreRestSiblings": false
}
],
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/unbound-method": "off",
"react/display-name": "off"
},
"settings": {
"react": {
"pragma": "React",
"version": "detect"
}
}
}
@CroModder
Copy link

I know it's not been updated for 2 years, but one minor change in the file and it will be relevant again. "prettier/@typescript-eslint" should be removed from the "extends" property. It's merged into "prettier" in eslint-config-prettier 8.0.0 (changelog)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment