31 lines
660 B
JavaScript
31 lines
660 B
JavaScript
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
|
|
]
|