-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy patheslint.config.js
More file actions
60 lines (59 loc) · 1.39 KB
/
Copy patheslint.config.js
File metadata and controls
60 lines (59 loc) · 1.39 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
49
50
51
52
53
54
55
56
57
58
59
60
/**
* WordPress dependencies
*/
const defaultConfig = require( '@wordpress/eslint-plugin' );
module.exports = [
{
ignores: [ '**/node_modules/**', '**/vendor/**', '**/build/**' ],
},
...defaultConfig.configs.recommended,
{
rules: {
'import/no-extraneous-dependencies': 'off',
'react/jsx-boolean-value': 'error',
'react/jsx-curly-brace-presence': [ 'error', { props: 'never', children: 'never' } ],
'@wordpress/dependency-group': 'error',
'@wordpress/no-unsafe-wp-apis': 'off',
'@wordpress/no-setting-ds-tokens': 'off',
'@wordpress/no-unknown-ds-tokens': 'off',
'@wordpress/i18n-text-domain': [
'error',
{
allowedTextDomain: 'flexible-table-block',
},
],
'prettier/prettier': [
'error',
{
useTabs: true,
tabWidth: 2,
singleQuote: true,
printWidth: 100,
bracketSpacing: true,
parenSpacing: true,
bracketSameLine: false,
},
],
},
},
...defaultConfig.configs[ 'test-unit' ].map( ( config ) => ( {
...config,
files: [
'**/test/**/*.ts',
'**/test/**/*.js',
'**/__tests__/**/*.ts',
'**/__tests__/**/*.js',
'**/*.spec.ts',
'**/*.spec.js',
],
} ) ),
...defaultConfig.configs[ 'test-e2e' ].map( ( config ) => ( {
...config,
files: [ 'test/e2e/**/*.js', 'test/e2e/**/*.ts' ],
rules: {
...config.rules,
'jest/expect-expect': 'off',
'react-hooks/rules-of-hooks': 'off',
},
} ) ),
];