forked from Shopify/hydrogen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
47 lines (47 loc) · 1.3 KB
/
.eslintrc.js
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
/**
* @type {import("@types/eslint").Linter.BaseConfig}
*/
module.exports = {
parser: '@typescript-eslint/parser',
rules: {
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/naming-convention': 'off',
'@typescript-eslint/no-non-null-asserted-optional-chain': 'off',
'no-useless-escape': 'off',
'no-case-declarations': 'off',
},
overrides: [
{
files: ['./templates/demo-store/*'],
rules: {
'import/order': [
'error',
{
/**
* @description
*
* This keeps imports separate from one another, ensuring that imports are separated
* by their relative groups. As you move through the groups, imports become closer
* to the current file.
*
* @example
* ```
* import fs from 'fs';
*
* import package from 'npm-package';
*
* import xyz from '~/project-file';
*
* import index from '../';
*
* import sibling from './foo';
* ```
*/
groups: ['builtin', 'external', 'internal', 'parent', 'sibling'],
'newlines-between': 'always',
},
],
},
},
],
};