chore(basic): refesh standard.js (#193)

This commit is contained in:
曾明健 2023-06-02 22:04:48 +08:00 committed by GitHub
parent 0947ddb151
commit 7b48da27dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,20 +9,24 @@ module.exports = {
}, },
sourceType: 'module', sourceType: 'module',
}, },
env: { env: {
es2021: true, es2021: true,
node: true, node: true,
}, },
plugins: [ plugins: [
'import', 'import',
'n', 'n',
'promise', 'promise',
], ],
globals: { globals: {
document: 'readonly', document: 'readonly',
navigator: 'readonly', navigator: 'readonly',
window: 'readonly', window: 'readonly',
}, },
rules: { rules: {
'no-var': 'warn', 'no-var': 'warn',
'object-shorthand': ['warn', 'properties'], 'object-shorthand': ['warn', 'properties'],
@ -126,7 +130,7 @@ module.exports = {
'no-mixed-operators': ['error', { 'no-mixed-operators': ['error', {
groups: [ groups: [
['==', '!=', '===', '!==', '>', '>=', '<', '<='], ['==', '!=', '===', '!==', '>', '>=', '<', '<='],
['&&', '||', '?:'], ['&&', '||'],
['in', 'instanceof'], ['in', 'instanceof'],
], ],
allowSamePrecedence: true, allowSamePrecedence: true,