This repository has been archived by the owner on Dec 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathindex.js
61 lines (59 loc) · 2.58 KB
/
index.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
import eslint from './configs/eslint.js'
import prettier from './configs/prettier.js'
import react from './configs/react.js'
import typescript from './configs/typescript.js'
import smarthr from 'eslint-plugin-smarthr'
/**
* @type {import('eslint').Linter.Config[]}
*/
export default [
...eslint,
...prettier,
...react,
...typescript,
{
name: 'eslint-config-smarthr/index',
plugins: {
smarthr
},
rules: {
'@typescript-eslint/no-shadow': ['error'],
'@typescript-eslint/no-var-requires': 'off',
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-shadow.md
'no-shadow': 'off',
// original rules
'smarthr/a11y-anchor-has-href-attribute': 'error',
'smarthr/a11y-clickable-element-has-text': 'error',
'smarthr/a11y-delegate-element-has-role-presentation': 'error',
'smarthr/a11y-form-control-in-form': 'warn', // TODO: 2024/11/1にwarn化。1mくらいを目処に問題なければerrorに変更予定
'smarthr/a11y-heading-in-sectioning-content': 'error',
'smarthr/a11y-image-has-alt-attribute': 'error',
'smarthr/a11y-input-has-name-attribute': 'error',
'smarthr/a11y-input-in-form-control': 'error',
'smarthr/a11y-numbered-text-within-ol': 'error',
'smarthr/a11y-prohibit-input-maxlength-attribute': 'error',
'smarthr/a11y-prohibit-input-placeholder': 'error',
'smarthr/a11y-prohibit-sectioning-content-in-form': 'warn', // TODO: 2024/11/5にwarn化。1mくらいを目処に問題なければerrorに変更予定
'smarthr/a11y-prohibit-useless-sectioning-fragment': 'error',
'smarthr/a11y-replace-unreadable-symbol': 'error',
'smarthr/a11y-trigger-has-button': 'error',
'smarthr/best-practice-for-button-element': 'error',
'smarthr/best-practice-for-date': 'error',
'smarthr/best-practice-for-layouts': 'error',
'smarthr/best-practice-for-remote-trigger-dialog': 'error',
'smarthr/format-import-path': 'off',
'smarthr/format-translate-component': 'off',
'smarthr/jsx-start-with-spread-attributes': [ 'error', { fix: true } ],
'smarthr/no-import-other-domain': 'off',
'smarthr/prohibit-export-array-type': 'error',
'smarthr/prohibit-file-name': 'off',
'smarthr/prohibit-import': 'off',
'smarthr/prohibit-path-within-template-literal': 'off',
'smarthr/require-barrel-import': 'error',
'smarthr/require-declaration': 'off',
'smarthr/require-export': 'off',
'smarthr/require-import': 'off',
'smarthr/trim-props': 'error',
}
}
]