chore: update eslint and prettier configuration
This commit is contained in:
35
eslint.config.mjs
Normal file
35
eslint.config.mjs
Normal file
@@ -0,0 +1,35 @@
|
||||
import nextConfig from 'eslint-config-next';
|
||||
import prettierPlugin from 'eslint-plugin-prettier';
|
||||
|
||||
const additionalRules = {
|
||||
'prettier/prettier': 'error',
|
||||
'react-hooks/set-state-in-effect': 'off',
|
||||
'react-hooks/exhaustive-deps': 'warn',
|
||||
'react-hooks/immutability': 'off',
|
||||
'react-hooks/incompatible-library': 'off',
|
||||
'react-hooks/purity': 'off',
|
||||
'import/no-anonymous-default-export': 'off',
|
||||
};
|
||||
|
||||
const eslintConfig = [
|
||||
{
|
||||
ignores: [
|
||||
'.next/**',
|
||||
'node_modules/**',
|
||||
'dist/**',
|
||||
'build/**',
|
||||
'coverage/**',
|
||||
'public/**',
|
||||
],
|
||||
},
|
||||
...nextConfig,
|
||||
{
|
||||
files: ['**/*.{js,jsx,ts,tsx}'],
|
||||
plugins: {
|
||||
prettier: prettierPlugin,
|
||||
},
|
||||
rules: additionalRules,
|
||||
},
|
||||
];
|
||||
|
||||
export default eslintConfig;
|
||||
Reference in New Issue
Block a user