forked from cypress-io/github-action
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy patheslint.config.mjs
39 lines (38 loc) · 950 Bytes
/
eslint.config.mjs
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
import globals from 'globals'
import pluginJs from '@eslint/js'
import pluginCypress from 'eslint-plugin-cypress/flat'
import stylistic from '@stylistic/eslint-plugin'
export default [
pluginJs.configs.recommended,
pluginCypress.configs.recommended,
{
name: 'global-ignores',
ignores: [
'dist/',
'examples/component-tests/dist/',
'examples/nextjs/.next/',
'examples/nextjs/src/app/',
'examples/wait-on-vite/dist/',
],
},
{
name: 'all-js',
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},
},
},
{
name: 'style',
files: ['eslint.config.mjs', 'examples/**/*.js'],
...stylistic.configs.recommended,
rules: {
'@stylistic/indent': ['error', 2],
'@stylistic/comma-dangle': ['error', 'always-multiline'],
'@stylistic/quotes': ['error', 'single'],
'@stylistic/semi': ['error', 'never'],
},
},
]