提交 8e196464 编写于 作者: fxy060608's avatar fxy060608

chore: update eslintrc

上级 49d53138
...@@ -26,7 +26,7 @@ module.exports = { ...@@ -26,7 +26,7 @@ module.exports = {
overrides: [ overrides: [
// tests, no restrictions (runs in Node / jest with jsdom) // tests, no restrictions (runs in Node / jest with jsdom)
{ {
files: ['**/__tests__/**'], files: ['**/__tests__/**', '**/dist/**'],
rules: { rules: {
'no-restricted-globals': 'off', 'no-restricted-globals': 'off',
'no-restricted-syntax': 'off', 'no-restricted-syntax': 'off',
...@@ -44,10 +44,12 @@ module.exports = { ...@@ -44,10 +44,12 @@ module.exports = {
// Packages targeting Node // Packages targeting Node
{ {
files: [ files: [
'packages/{uni-cli-shared,uni-cli-nvue,uni-app-vite,uni-h5-vite,uni-mp-vite,uni-mp-compiler,vite-plugin-uni}/**',
'packages/*/vite.config.ts',
'.eslintrc.js', '.eslintrc.js',
'jest.config.js',
'rollup.config.js',
'scripts/**', 'scripts/**',
'packages/{uni-cli-shared,uni-cli-nvue,uni-app-vite,uni-h5-vite,uni-mp-vite,uni-mp-compiler,vite-plugin-uni}/**',
'packages/*/vite.config.ts',
], ],
rules: { rules: {
'no-restricted-globals': ['error', ...DOMGlobals], 'no-restricted-globals': ['error', ...DOMGlobals],
......
...@@ -4,6 +4,7 @@ module.exports = { ...@@ -4,6 +4,7 @@ module.exports = {
globals: { globals: {
__DEV__: true, __DEV__: true,
__TEST__: true, __TEST__: true,
__NODE_JS__: true,
__VERSION__: require('./package.json').version, __VERSION__: require('./package.json').version,
__BROWSER__: false, __BROWSER__: false,
__GLOBAL__: false, __GLOBAL__: false,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册