2022-07-08 14:48:43 +00:00
|
|
|
module.exports = {
|
2022-09-02 11:43:37 +00:00
|
|
|
plugins: ['prettier', 'import'],
|
2022-08-25 15:36:02 +00:00
|
|
|
extends: ['react-app'],
|
2022-07-08 14:48:43 +00:00
|
|
|
rules: {
|
2022-08-25 15:36:02 +00:00
|
|
|
'prettier/prettier': 'error',
|
|
|
|
'no-unused-vars': 'off',
|
|
|
|
'no-loop-func': 'off',
|
2022-09-02 11:43:37 +00:00
|
|
|
'no-restricted-globals': 'off',
|
|
|
|
|
|
|
|
'import/no-useless-path-segments': 'error',
|
|
|
|
'import/order': [
|
|
|
|
'error',
|
|
|
|
{
|
2022-09-02 14:07:24 +00:00
|
|
|
alphabetize: {
|
|
|
|
caseInsensitive: true,
|
|
|
|
order: 'asc'
|
|
|
|
},
|
2022-09-02 11:43:37 +00:00
|
|
|
groups: [
|
|
|
|
'builtin', // Built-in types are first
|
|
|
|
'external',
|
|
|
|
['sibling', 'parent'], // Then sibling and parent types. They can be mingled together
|
|
|
|
'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']
|
|
|
|
}
|
|
|
|
]
|
2022-07-08 14:48:43 +00:00
|
|
|
}
|
|
|
|
};
|