37 lines
810 B
JavaScript
37 lines
810 B
JavaScript
import nextConfig from 'eslint-config-next';
|
|
import prettierPlugin from 'eslint-plugin-prettier';
|
|
|
|
const prettierRules = {
|
|
'prettier/prettier': [
|
|
'error',
|
|
{
|
|
singleQuote: true,
|
|
trailingComma: 'all',
|
|
printWidth: 100,
|
|
endOfLine: 'auto',
|
|
},
|
|
],
|
|
};
|
|
|
|
const additionalRules = {
|
|
...prettierRules,
|
|
// Some React rules are intentionally relaxed for this project.
|
|
'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',
|
|
};
|
|
|
|
export default [
|
|
...nextConfig,
|
|
{
|
|
files: ['**/*.{js,jsx,ts,tsx}'],
|
|
plugins: {
|
|
prettier: prettierPlugin,
|
|
},
|
|
rules: additionalRules,
|
|
},
|
|
];
|