-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy patheslint.config.mjs
More file actions
48 lines (47 loc) · 1.1 KB
/
Copy patheslint.config.mjs
File metadata and controls
48 lines (47 loc) · 1.1 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
/**
* WordPress JS coding standards for WP-DBManager.
*
* "recommended-with-formatting" uses native ESLint formatting rules rather
* than delegating to Prettier, so no Prettier install is needed.
*
* Excluded from the SVN deploy, so this never ships to users.
*/
import wordpress from '@wordpress/eslint-plugin';
import globals from 'globals';
export default [
{
ignores: [ '**/node_modules/**', '**/vendor/**', '**/*.min.js' ],
},
...wordpress.configs[ 'recommended-with-formatting' ],
{
languageOptions: {
globals: {
...globals.browser,
// Localised into the page by wp_localize_script().
wpDBManagerL10n: 'readonly',
},
},
settings: {
react: { version: '18.0' },
},
},
{
files: [ 'tests/js/**/*.test.js' ],
languageOptions: {
globals: {
...globals.node,
},
},
},
{
// The Playwright suite is CommonJS and runs under Node, not in a page:
// it requires its helpers and exports nothing to a browser.
files: [ 'tests/e2e/**/*.js', 'playwright.config.js' ],
languageOptions: {
sourceType: 'commonjs',
globals: {
...globals.node,
},
},
},
];