init
This commit is contained in:
30
eslint.config.mjs
Normal file
30
eslint.config.mjs
Normal file
@@ -0,0 +1,30 @@
|
||||
import globals from 'globals'
|
||||
import prettier from 'eslint-config-prettier'
|
||||
|
||||
export default [
|
||||
{
|
||||
ignores: ['node_modules/**', 'miniprogram_npm/**', 'coverage/**']
|
||||
},
|
||||
{
|
||||
files: ['**/*.js'],
|
||||
languageOptions: {
|
||||
ecmaVersion: 2022,
|
||||
sourceType: 'commonjs',
|
||||
globals: {
|
||||
...globals.browser,
|
||||
...globals.node,
|
||||
App: 'readonly',
|
||||
Behavior: 'readonly',
|
||||
Component: 'readonly',
|
||||
Page: 'readonly',
|
||||
getApp: 'readonly',
|
||||
getCurrentPages: 'readonly',
|
||||
wx: 'readonly'
|
||||
}
|
||||
},
|
||||
rules: {
|
||||
'no-console': ['warn', { allow: ['warn', 'error'] }]
|
||||
}
|
||||
},
|
||||
prettier
|
||||
]
|
||||
Reference in New Issue
Block a user