mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-24 20:36:40 +07:00
(nextjs) added eslint and import sorting
This commit is contained in:
parent
e5f8d5a551
commit
0838bf7ee6
330 changed files with 1576 additions and 896 deletions
33
.eslintrc.js
Normal file
33
.eslintrc.js
Normal file
|
@ -0,0 +1,33 @@
|
|||
module.exports = {
|
||||
extends: ['plugin:react/recommended', 'plugin:@next/next/recommended'],
|
||||
rules: {
|
||||
'react/prop-types': 0,
|
||||
'react/display-name': 0,
|
||||
'react/react-in-jsx-scope': 0,
|
||||
'@next/next/no-img-element': 0,
|
||||
'import/order': [
|
||||
'error',
|
||||
{
|
||||
alphabetize: { order: 'asc' },
|
||||
'newlines-between': 'always',
|
||||
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'unknown'],
|
||||
pathGroups: [
|
||||
{
|
||||
pattern: 'react',
|
||||
group: 'builtin',
|
||||
position: 'before',
|
||||
},
|
||||
{ pattern: '~/**', group: 'internal' },
|
||||
{ pattern: './**', group: 'sibling' },
|
||||
],
|
||||
pathGroupsExcludedImportTypes: ['react'],
|
||||
},
|
||||
],
|
||||
},
|
||||
parserOptions: {
|
||||
ecmaVersion: 7,
|
||||
sourceType: 'module',
|
||||
},
|
||||
plugins: ['import', 'react-hooks'],
|
||||
parser: '@typescript-eslint/parser',
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue