Skip to content

Instantly share code, notes, and snippets.

@AZagatti
Created June 5, 2020 03:17
Show Gist options
  • Save AZagatti/b1977e0457316f9c2bd7677c8770e7e6 to your computer and use it in GitHub Desktop.
Save AZagatti/b1977e0457316f9c2bd7677c8770e7e6 to your computer and use it in GitHub Desktop.
Eslint e Prettier TS
**/*.js
node_modules
build
{
"env": {
"es6": true
},
"extends": [
"plugin:react/recommended",
"airbnb",
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint",
"plugin:prettier/recommended"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": [
"react",
"react-hooks",
"@typescript-eslint",
"prettier"
],
"rules": {
"prettier/prettier": "error",
"import/no-extraneous-dependencies": "off",
"react/jsx-curly-newline": "off",
"react/jsx-props-no-spreading": "off",
"react/prop-types": "off",
"react/jsx-one-expression-per-line": "off",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"react/jsx-filename-extension": [1, { "extensions": [".tsx"] }],
"no-param-reassign": "off",
"no-unused-expressions": "off",
"import/prefer-default-export": "off",
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/explicit-function-return-type": [
"error",
{
"allowExpressions": true
}
],
"import/extensions": [
"error",
"ignorePackages",
{
"ts": "never",
"tsx": "never"
}
]
},
"settings": {
"import/resolver": {
"typescript": {}
}
}
}
{
"singleQuote": true,
"trailingComma": "all",
"tabWidth": 2,
"semi": true
}
"@typescript-eslint/eslint-plugin": "^2.29.0",
"@typescript-eslint/parser": "^2.29.0",
"eslint": "^6.8.0",
"eslint-config-airbnb": "^18.1.0",
"eslint-config-prettier": "^6.10.0",
"eslint-import-resolver-typescript": "^2.0.0",
"eslint-plugin-import": "^2.20.1",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-prettier": "^3.1.2",
"eslint-plugin-react": "^7.19.0",
"eslint-plugin-react-hooks": "^2.5.0",
"prettier": "^1.19.1",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment