mirror of
https://github.com/google/blockly.git
synced 2026-01-07 00:50:27 +01:00
chore(build): Update compiler & linter input language to ES2020 (#5745)
Also: - Ensure that the `comma-dangle` rule will not be applied to function parameter lists (even when multi-line). - Update tests/node/.eslintrc.json to make the environment node-specific and not pinned to es6.
This commit is contained in:
committed by
GitHub
parent
25a4561e21
commit
3e9878169b
@@ -64,10 +64,17 @@
|
||||
// Blockly uses objects as maps, but uses Object.create(null) to
|
||||
// instantiate them.
|
||||
"guard-for-in": ["off"],
|
||||
"prefer-spread": ["off"]
|
||||
"prefer-spread": ["off"],
|
||||
"comma-dangle": ["error", {
|
||||
"arrays": "always-multiline",
|
||||
"objects": "always-multiline",
|
||||
"imports": "always-multiline",
|
||||
"exports": "always-multiline",
|
||||
"functions": "ignore"
|
||||
}]
|
||||
},
|
||||
"env": {
|
||||
"es6": true,
|
||||
"es2020": true,
|
||||
"browser": true
|
||||
},
|
||||
"globals": {
|
||||
|
||||
@@ -453,7 +453,7 @@ function compile(options) {
|
||||
const defaultOptions = {
|
||||
compilation_level: 'SIMPLE_OPTIMIZATIONS',
|
||||
warning_level: argv.verbose ? 'VERBOSE' : 'DEFAULT',
|
||||
language_in: 'ECMASCRIPT6_STRICT',
|
||||
language_in: 'ECMASCRIPT_2020',
|
||||
language_out: 'ECMASCRIPT5_STRICT',
|
||||
rewrite_polyfills: true,
|
||||
hide_warnings_for: 'node_modules',
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
{
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 6
|
||||
},
|
||||
"env": {
|
||||
"node": true,
|
||||
"browser": false,
|
||||
"mocha": true
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user