mirror of
https://github.com/vitejs/vite.git
synced 2024-11-21 14:48:41 +00:00
chore: update eslint config (#17788)
This commit is contained in:
parent
461d37b947
commit
796eef3af1
@ -133,7 +133,8 @@ export default tseslint.config(
|
||||
},
|
||||
],
|
||||
|
||||
'regexp/no-contradiction-with-assertion': 'error',
|
||||
'regexp/prefer-regexp-exec': 'error',
|
||||
'regexp/prefer-regexp-test': 'error',
|
||||
// in some cases using explicit letter-casing is more performant than the `i` flag
|
||||
'regexp/use-ignore-case': 'off',
|
||||
},
|
||||
@ -221,6 +222,14 @@ export default tseslint.config(
|
||||
'n/no-extraneous-import': 'off',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'disables/vite/cjs',
|
||||
files: ['packages/vite/index.cjs'],
|
||||
rules: {
|
||||
'no-restricted-globals': 'off',
|
||||
'n/no-missing-require': 'off',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'disables/create-vite/templates',
|
||||
files: [
|
||||
|
@ -1,12 +1,9 @@
|
||||
/* eslint-disable no-restricted-globals */
|
||||
|
||||
warnCjsUsage()
|
||||
|
||||
// type utils
|
||||
module.exports.defineConfig = (config) => config
|
||||
|
||||
// proxy cjs utils (sync functions)
|
||||
// eslint-disable-next-line n/no-missing-require -- will be generated by build
|
||||
Object.assign(module.exports, require('./dist/node-cjs/publicUtils.cjs'))
|
||||
|
||||
// async functions, can be redirect from ESM build
|
||||
|
Loading…
Reference in New Issue
Block a user