Move eslint and stylelint configs to package.json
This commit is contained in:
43
.eslintrc
43
.eslintrc
@@ -1,43 +0,0 @@
|
|||||||
{
|
|
||||||
"root": true,
|
|
||||||
"extends": "eslint:recommended",
|
|
||||||
"globals": {
|
|
||||||
"wp": true
|
|
||||||
},
|
|
||||||
"env": {
|
|
||||||
"node": true,
|
|
||||||
"es6": true,
|
|
||||||
"amd": true,
|
|
||||||
"browser": true,
|
|
||||||
"jquery": true
|
|
||||||
},
|
|
||||||
"parserOptions": {
|
|
||||||
"ecmaFeatures": {
|
|
||||||
"globalReturn": true,
|
|
||||||
"generators": false,
|
|
||||||
"objectLiteralDuplicateProperties": false,
|
|
||||||
"experimentalObjectRestSpread": true
|
|
||||||
},
|
|
||||||
"ecmaVersion": 2017,
|
|
||||||
"sourceType": "module"
|
|
||||||
},
|
|
||||||
"plugins": [
|
|
||||||
"import",
|
|
||||||
],
|
|
||||||
"settings": {
|
|
||||||
"import/core-modules": [],
|
|
||||||
"import/ignore": [
|
|
||||||
"node_modules",
|
|
||||||
"\\.(coffee|scss|css|less|hbs|svg|json)$"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"rules": {
|
|
||||||
"comma-dangle": ["error", {
|
|
||||||
"arrays": "always-multiline",
|
|
||||||
"objects": "always-multiline",
|
|
||||||
"imports": "always-multiline",
|
|
||||||
"exports": "always-multiline",
|
|
||||||
"functions": "ignore"
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "stylelint-config-standard"
|
|
||||||
}
|
|
||||||
49
package.json
49
package.json
@@ -22,6 +22,55 @@
|
|||||||
"android 4",
|
"android 4",
|
||||||
"opera 12"
|
"opera 12"
|
||||||
],
|
],
|
||||||
|
"eslintConfig": {
|
||||||
|
"root": true,
|
||||||
|
"extends": "eslint:recommended",
|
||||||
|
"globals": {
|
||||||
|
"wp": true
|
||||||
|
},
|
||||||
|
"env": {
|
||||||
|
"node": true,
|
||||||
|
"es6": true,
|
||||||
|
"amd": true,
|
||||||
|
"browser": true,
|
||||||
|
"jquery": true
|
||||||
|
},
|
||||||
|
"parserOptions": {
|
||||||
|
"ecmaFeatures": {
|
||||||
|
"globalReturn": true,
|
||||||
|
"generators": false,
|
||||||
|
"objectLiteralDuplicateProperties": false,
|
||||||
|
"experimentalObjectRestSpread": true
|
||||||
|
},
|
||||||
|
"ecmaVersion": 2017,
|
||||||
|
"sourceType": "module"
|
||||||
|
},
|
||||||
|
"plugins": [
|
||||||
|
"import"
|
||||||
|
],
|
||||||
|
"settings": {
|
||||||
|
"import/core-modules": [],
|
||||||
|
"import/ignore": [
|
||||||
|
"node_modules",
|
||||||
|
"\\.(coffee|scss|css|less|hbs|svg|json)$"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"rules": {
|
||||||
|
"comma-dangle": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
"arrays": "always-multiline",
|
||||||
|
"objects": "always-multiline",
|
||||||
|
"imports": "always-multiline",
|
||||||
|
"exports": "always-multiline",
|
||||||
|
"functions": "ignore"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"stylelint": {
|
||||||
|
"extends": "stylelint-config-standard"
|
||||||
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "webpack --progress --config resources/assets/build/webpack.config.js",
|
"build": "webpack --progress --config resources/assets/build/webpack.config.js",
|
||||||
"build:production": "webpack --progress -p --config resources/assets/build/webpack.config.js",
|
"build:production": "webpack --progress -p --config resources/assets/build/webpack.config.js",
|
||||||
|
|||||||
Reference in New Issue
Block a user