forked from packdigital/pack-hydrogen-theme-blueprint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
65 lines (65 loc) · 1.78 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/**
* @type {import("@types/eslint").Linter.BaseConfig}
*/
module.exports = {
extends: [
'@remix-run/eslint-config',
'plugin:hydrogen/recommended',
'plugin:hydrogen/typescript',
'plugin:tailwindcss/recommended',
],
overrides: [
{
files: ['*.ts', '*.tsx', '*.js', '*.jsx'],
parser: '@typescript-eslint/parser',
},
],
rules: {
'no-console': 'off',
'no-inline-styles': 'off',
'react-hooks/exhaustive-deps': 'off',
'react/forbid-prop-types': 'off',
'react/no-array-index-key': 'off',
'react/prop-types': 'off',
'react/require-default-props': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/naming-convention': 'off',
'hydrogen/prefer-image-component': 'off',
'no-useless-escape': 'off',
'@typescript-eslint/no-non-null-asserted-optional-chain': 'off',
'no-case-declarations': 'off',
// TODO: Remove jest plugin from hydrogen/eslint-plugin
'jest/no-deprecated-functions': 'off',
'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',
},
],
},
globals: {
document: true,
window: true,
},
};