-
Notifications
You must be signed in to change notification settings - Fork 96
/
eslint.config.js
41 lines (37 loc) · 1.04 KB
/
eslint.config.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
import { States } from '@patternfly/eslint-config-elements';
import tseslint from 'typescript-eslint';
import pfe from '@patternfly/eslint-config-elements';
import pfePlugin from '@patternfly/eslint-plugin-elements';
import { includeIgnoreFile } from '@eslint/compat';
export default tseslint.config(
...pfe,
includeIgnoreFile(new URL('.gitignore', import.meta.url).pathname),
{
name: 'local/ignores',
ignores: [
'elements/pf-icon/demo/icons/**/*.js',
'tools/create-element/templates/**/*',
'tools/create-element/**/*.js',
'tools/create-element/templates/**/*',
],
},
{
name: 'local/elements/package.json',
files: ['elements/package.json'],
plugins: { '@patternfly/elements': pfePlugin },
rules: {
'@patternfly/elements/no-missing-package-exports': [States.ERROR, {
matches: ['elements/*/pf-*.js'],
}],
},
},
{
name: 'local/tools/create-element',
files: [
'tools/create-element/**/*.ts',
],
rules: {
'no-console': States.OFF,
},
},
);