forked from DotCamp/ultimate-blocks-legacy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
48 lines (46 loc) · 1 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
const path = require( 'path' );
const packageJsonAliasMap = require( path.resolve( './package.json' ) ).alias;
module.exports = {
extends: [ 'plugin:@wordpress/eslint-plugin/recommended' ],
plugins: [ 'import' ],
ignorePatterns: [ 'node_modules/', 'dist/', 'bundle-dist/', 'vendor/' ],
parser: '@babel/eslint-parser',
parserOptions: {
requireConfigFile: false,
babelOptions: {
presets: [ '@babel/preset-react' ],
},
},
rules: {
'import/no-extraneous-dependencies': [ 'off' ],
},
settings: {
'import/resolver': {
webpack: {
config: './webpack.config.js',
},
'eslint-import-resolver-custom-alias': {
alias: packageJsonAliasMap,
extensions: [ '.js', '.jsx' ],
},
},
},
overrides: [
{
files: [ '__tests__/js/unit/**/*.js' ],
extends: [ 'plugin:testing-library/react' ],
globals: {
beforeEach: true,
describe: true,
expect: true,
it: true,
},
},
],
globals: {
self: true,
ubPriorityData: true,
UB_ENV: true,
localStorage: true,
},
};