Skip to content

Instantly share code, notes, and snippets.

@sarthology
Created November 21, 2020 13:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sarthology/9beb8ae4a6d90d90d9f7e3462a05c5eb to your computer and use it in GitHub Desktop.
Save sarthology/9beb8ae4a6d90d90d9f7e3462a05c5eb to your computer and use it in GitHub Desktop.
module.exports = {
parserOptions: {
ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features
sourceType: 'module', // Allows for the use of imports
ecmaFeatures: {
jsx: true // Allows for the parsing of JSX
}
},
env: {
browser: true,
node: true,
es6: true
},
plugins: ['simple-import-sort'],
settings: {
react: {
version: 'detect' // Tells eslint-plugin-react to automatically detect the version of React to use
}
},
extends: [
'eslint:recommended',
'plugin:jsx-a11y/recommended',
'plugin:react/recommended', // Uses the recommended rules from @eslint-plugin-react
'plugin:prettier/recommended', // Enables eslint-plugin-prettier and eslint-config-prettier. This will display prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
'plugin:sonarjs/recommended',
'plugin:unicorn/recommended',
'plugin:security/recommended',
'plugin:react-hooks/recommended'
],
rules: {
'no-console': 'error',
'react/react-in-jsx-scope': 'off',
'react/prop-types': 'off',
'simple-import-sort/sort': 'error',
'unicorn/prevent-abbreviations': [
'error',
{
whitelist: {
getStaticProps: true
}
}
],
'unicorn/filename-case': [
'error',
{
cases: {
camelCase: true
}
}
]
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment