Skip to content

Commit 796eef3

Browse files
authored
chore: update eslint config (#17788)
1 parent 461d37b commit 796eef3

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

eslint.config.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,8 @@ export default tseslint.config(
133133
},
134134
],
135135

136-
'regexp/no-contradiction-with-assertion': 'error',
136+
'regexp/prefer-regexp-exec': 'error',
137+
'regexp/prefer-regexp-test': 'error',
137138
// in some cases using explicit letter-casing is more performant than the `i` flag
138139
'regexp/use-ignore-case': 'off',
139140
},
@@ -221,6 +222,14 @@ export default tseslint.config(
221222
'n/no-extraneous-import': 'off',
222223
},
223224
},
225+
{
226+
name: 'disables/vite/cjs',
227+
files: ['packages/vite/index.cjs'],
228+
rules: {
229+
'no-restricted-globals': 'off',
230+
'n/no-missing-require': 'off',
231+
},
232+
},
224233
{
225234
name: 'disables/create-vite/templates',
226235
files: [

packages/vite/index.cjs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
/* eslint-disable no-restricted-globals */
2-
31
warnCjsUsage()
42

53
// type utils
64
module.exports.defineConfig = (config) => config
75

86
// proxy cjs utils (sync functions)
9-
// eslint-disable-next-line n/no-missing-require -- will be generated by build
107
Object.assign(module.exports, require('./dist/node-cjs/publicUtils.cjs'))
118

129
// async functions, can be redirect from ESM build

0 commit comments

Comments
 (0)