Skip to content

Instantly share code, notes, and snippets.

@manueldevjour
Created March 20, 2023 11:13
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 manueldevjour/cb2524a9fdd56b4544df4c8237ad84ce to your computer and use it in GitHub Desktop.
Save manueldevjour/cb2524a9fdd56b4544df4c8237ad84ce to your computer and use it in GitHub Desktop.
WIP: Temporal use of lintr because of a mixing of different projects
module.exports = {
extends: ['next', 'prettier'],
env: {
browser: true,
es6: true,
node: true
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 6,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
modules: true,
experimentalObjectRestSpread: true
},
babelOptions: {
presets: ['@babel/preset-react']
}
},
plugins: ['prettier', '@typescript-eslint', 'react', 'react-hooks'],
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:import/recommended',
'plugin:jsx-a11y/recommended',
'plugin:@typescript-eslint/recommended',
'eslint-config-prettier'
],
rules: {
semi: ['error', 'never'],
'no-console': ['warn'],
'no-unused-vars': ['warn'],
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
'react/prop-types': 'off'
},
settings: {
react: {
// Tells eslint-plugin-react to automatically detect the version of React to use.
version: 'detect'
},
// Tells eslint how to resolve imports
'import/resolver': {
node: {
paths: ['src'],
extensions: ['.js', '.jsx', '.ts', '.tsx']
}
}
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment