forked from Automattic/newspack-blocks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
28 lines (28 loc) · 914 Bytes
/
.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
module.exports = {
extends: [
'plugin:@wordpress/eslint-plugin/recommended',
'plugin:prettier/recommended',
'plugin:react/recommended',
'plugin:jsdoc/recommended',
'plugin:import/errors',
'plugin:import/warnings',
],
env: {
browser: true,
},
rules: {
// Disallow importing or requiring packages that are not listed in package.json
// This prevents us from depending on transitive dependencies, which could break in unexpected ways.
'import/no-extraneous-dependencies': [ 'error' ],
// Skip prop types validation for now
'react/prop-types': 'off',
// Allow exporting components as default exports
'react/display-name': 'off',
'react/no-did-mount-set-state': 'error',
// Since this code is always ran in Gutenberg, React will be in scope
'react/react-in-jsx-scope': 'off',
'react/jsx-curly-spacing': 'off',
// JSDoc rules overrides
'jsdoc/require-returns': 'off',
},
};