-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.eslintrc.js
More file actions
48 lines (44 loc) · 1.24 KB
/
Copy path.eslintrc.js
File metadata and controls
48 lines (44 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// eslint.config.js
import remix from '@remix-run/eslint-config';
import remixNode from '@remix-run/eslint-config/node';
import eslintRecommended from '@eslint/js';
import prettierPlugin from 'eslint-plugin-prettier';
export default [
remix,
remixNode,
eslintRecommended.configs.recommended,
{
name: 'custom-rules',
plugins: {
prettier: prettierPlugin,
},
rules: {
'prettier/prettier': 'error',
indent: ['error', 2],
quotes: ['error', 'single'],
semi: ['error', 'always'],
'import/order': [
'warn',
{
groups: [
'builtin', // Node.js built-ins (fs, path, etc.)
'external', // npm packages (react, lodash, etc.)
'internal', // Internal project modules
['parent', 'sibling'], // Relative imports
'index', // index files
],
pathGroups: [
{ pattern: '~/**', group: 'internal', position: 'before' },
],
pathGroupsExcludedImportTypes: ['builtin'],
'newlines-between': 'always',
alphabetize: { order: 'asc', caseInsensitive: true },
},
],
},
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
},
];