🚨(frontend) add lib eslint-config-impress
Create the eslint-config-impress package to share eslint configuration with all impress projects.
This commit is contained in:
40
src/frontend/packages/eslint-config-impress/next.js
Normal file
40
src/frontend/packages/eslint-config-impress/next.js
Normal file
@@ -0,0 +1,40 @@
|
||||
const common = require('./common');
|
||||
|
||||
module.exports = {
|
||||
extends: [
|
||||
'next',
|
||||
'plugin:prettier/recommended',
|
||||
'plugin:@tanstack/eslint-plugin-query/recommended',
|
||||
'plugin:jsx-a11y/recommended',
|
||||
],
|
||||
parserOptions: {
|
||||
babelOptions: {
|
||||
presets: [require.resolve('next/babel')],
|
||||
},
|
||||
},
|
||||
settings: {
|
||||
'jsx-a11y': {
|
||||
polymorphicPropName: 'as',
|
||||
components: {
|
||||
Input: 'input',
|
||||
Button: 'button',
|
||||
Box: 'div',
|
||||
Text: 'span',
|
||||
Select: 'select',
|
||||
},
|
||||
},
|
||||
},
|
||||
rules: {
|
||||
...common.globalRules,
|
||||
'react-hooks/rules-of-hooks': 'error',
|
||||
'react-hooks/exhaustive-deps': 'error',
|
||||
},
|
||||
overrides: [
|
||||
...common.eslintTS,
|
||||
{
|
||||
files: ['*.spec.*', '*.test.*', '**/__mock__/**/*'],
|
||||
extends: ['impress/jest'],
|
||||
},
|
||||
],
|
||||
ignorePatterns: ['node_modules'],
|
||||
};
|
||||
Reference in New Issue
Block a user