Normalize and enforce single quotes in scripts
- Add quotes and semi rules to ESLint - Fix quotes and semicolons
This commit is contained in:
80
.eslintrc.js
80
.eslintrc.js
@@ -1,47 +1,49 @@
|
||||
module.exports = {
|
||||
"root": true,
|
||||
"extends": "eslint:recommended",
|
||||
"globals": {
|
||||
"wp": true
|
||||
'root': true,
|
||||
'extends': 'eslint:recommended',
|
||||
'globals': {
|
||||
'wp': true,
|
||||
},
|
||||
"env": {
|
||||
"node": true,
|
||||
"es6": true,
|
||||
"amd": true,
|
||||
"browser": true,
|
||||
"jquery": true
|
||||
'env': {
|
||||
'node': true,
|
||||
'es6': true,
|
||||
'amd': true,
|
||||
'browser': true,
|
||||
'jquery': true,
|
||||
},
|
||||
"parserOptions": {
|
||||
"ecmaFeatures": {
|
||||
"globalReturn": true,
|
||||
"generators": false,
|
||||
"objectLiteralDuplicateProperties": false,
|
||||
"experimentalObjectRestSpread": true
|
||||
'parserOptions': {
|
||||
'ecmaFeatures': {
|
||||
'globalReturn': true,
|
||||
'generators': false,
|
||||
'objectLiteralDuplicateProperties': false,
|
||||
'experimentalObjectRestSpread': true,
|
||||
},
|
||||
"ecmaVersion": 2017,
|
||||
"sourceType": "module"
|
||||
'ecmaVersion': 2017,
|
||||
'sourceType': 'module',
|
||||
},
|
||||
"plugins": [
|
||||
"import"
|
||||
'plugins': [
|
||||
'import',
|
||||
],
|
||||
"settings": {
|
||||
"import/core-modules": [],
|
||||
"import/ignore": [
|
||||
"node_modules",
|
||||
"\\.(coffee|scss|css|less|hbs|svg|json)$"
|
||||
]
|
||||
'settings': {
|
||||
'import/core-modules': [],
|
||||
'import/ignore': [
|
||||
'node_modules',
|
||||
'\\.(coffee|scss|css|less|hbs|svg|json)$',
|
||||
],
|
||||
},
|
||||
"rules": {
|
||||
"no-console": process.env.NODE_ENV === 'production' ? 2 : 0,
|
||||
"comma-dangle": [
|
||||
"error",
|
||||
'rules': {
|
||||
'no-console': process.env.NODE_ENV === 'production' ? 2 : 0,
|
||||
'quotes': ['error', 'single'],
|
||||
'semi': 'error',
|
||||
'comma-dangle': [
|
||||
'error',
|
||||
{
|
||||
"arrays": "always-multiline",
|
||||
"objects": "always-multiline",
|
||||
"imports": "always-multiline",
|
||||
"exports": "always-multiline",
|
||||
"functions": "ignore"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
'arrays': 'always-multiline',
|
||||
'objects': 'always-multiline',
|
||||
'imports': 'always-multiline',
|
||||
'exports': 'always-multiline',
|
||||
'functions': 'ignore',
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import 'jquery';
|
||||
|
||||
// Import everything from autoload
|
||||
import "./autoload/**/*"
|
||||
import './autoload/**/*';
|
||||
|
||||
// import local dependencies
|
||||
import Router from './util/Router';
|
||||
|
||||
@@ -60,4 +60,4 @@ class Router {
|
||||
}
|
||||
}
|
||||
|
||||
export default Router
|
||||
export default Router;
|
||||
|
||||
Reference in New Issue
Block a user