Skip to content

Instantly share code, notes, and snippets.

@willsza
Last active September 20, 2019 16:33
Show Gist options
  • Save willsza/324d049133e58278bc57c2740fa2f7a0 to your computer and use it in GitHub Desktop.
Save willsza/324d049133e58278bc57c2740fa2f7a0 to your computer and use it in GitHub Desktop.
module.exports = {
env: {
browser: true,
es6: true,
jest: true,
},
extends: [
'react-app',
'airbnb',
'plugin:@typescript-eslint/recommended',
'prettier/@typescript-eslint',
],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
},
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2018,
sourceType: 'module',
},
plugins: ['react', 'import', 'jsx-a11y'],
rules: {
'react/jsx-filename-extension': [
'error',
{
extensions: ['.tsx'],
},
],
'import/prefer-default-export': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-member-accessibility': 'off'
},
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
typescript: {},
},
},
};
"eslint.autoFixOnSave": true,
"eslint.validate": [
"javascript",
"javascriptreact",
{ "language": "typescript", "autofix": true },
{ "language": "typescriptreact", "autofix": true }
],
yarn add eslint-config-airbnb eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-react eslint-config-prettier eslint-plugin-prettier prettier @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-import-resolver-typescript -D
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment