mirror of
https://github.com/actualbudget/actual.git
synced 2026-03-11 12:43:09 -05:00
58 lines
1.5 KiB
JavaScript
58 lines
1.5 KiB
JavaScript
module.exports = {
|
|
plugins: ['prettier', 'import'],
|
|
extends: ['react-app'],
|
|
reportUnusedDisableDirectives: true,
|
|
rules: {
|
|
'prettier/prettier': 'error',
|
|
'no-unused-vars': [
|
|
'error',
|
|
{
|
|
args: 'none',
|
|
varsIgnorePattern: '^_',
|
|
ignoreRestSiblings: true,
|
|
},
|
|
],
|
|
|
|
'no-restricted-globals': ['error'].concat(
|
|
require('confusing-browser-globals').filter(g => g !== 'self'),
|
|
),
|
|
|
|
// https://github.com/eslint/eslint/issues/16954
|
|
// https://github.com/eslint/eslint/issues/16953
|
|
'no-loop-func': 'off',
|
|
|
|
// TODO: re-enable these rules
|
|
'react-hooks/exhaustive-deps': 'off',
|
|
|
|
'import/no-useless-path-segments': 'error',
|
|
'import/order': [
|
|
'error',
|
|
{
|
|
alphabetize: {
|
|
caseInsensitive: true,
|
|
order: 'asc',
|
|
},
|
|
groups: [
|
|
'builtin', // Built-in types are first
|
|
'external',
|
|
'parent',
|
|
'sibling',
|
|
'index', // Then the index file
|
|
],
|
|
'newlines-between': 'always',
|
|
pathGroups: [
|
|
// Enforce that React (and react-related packages) is the first import
|
|
{ group: 'builtin', pattern: 'react?(-*)', position: 'before' },
|
|
// Separate imports from Actual from "real" external imports
|
|
{
|
|
group: 'external',
|
|
pattern: 'loot-{core,design}/**/*',
|
|
position: 'after',
|
|
},
|
|
],
|
|
pathGroupsExcludedImportTypes: ['react'],
|
|
},
|
|
],
|
|
},
|
|
};
|