2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-05-15 11:59:39 +03:00

Switch to using xo directly.

This commit is contained in:
XhmikosR
2020-05-02 18:06:36 +03:00
parent 01b08d958c
commit caa0592bee
7 changed files with 4644 additions and 170 deletions
-6
View File
@@ -1,6 +0,0 @@
**/*.min.js
**/dist/
**/vendor/
/_site/
/js/coverage/
/site/static/sw.js
-65
View File
@@ -1,65 +0,0 @@
{
"root": true,
"extends": [
"plugin:import/errors",
"plugin:import/warnings",
"plugin:unicorn/recommended",
"xo",
"xo/browser"
],
"rules": {
"arrow-body-style": "off",
"capitalized-comments": "off",
"comma-dangle": [
"error",
"never"
],
"indent": [
"error",
2,
{
"MemberExpression": "off",
"SwitchCase": 1
}
],
"max-params": [
"warn",
5
],
"multiline-ternary": [
"error",
"always-multiline"
],
"new-cap": [
"error",
{
"properties": false
}
],
"no-console": "error",
"no-negated-condition": "off",
"object-curly-spacing": [
"error",
"always"
],
"operator-linebreak": [
"error",
"after"
],
"semi": [
"error",
"never"
],
"unicorn/explicit-length-check": "off",
"unicorn/no-array-callback-reference": "off",
"unicorn/no-array-method-this-argument": "off",
"unicorn/no-null": "off",
"unicorn/no-unused-properties": "error",
"unicorn/prefer-array-flat": "off",
"unicorn/prefer-dom-node-dataset": "off",
"unicorn/prefer-module": "off",
"unicorn/prefer-query-selector": "off",
"unicorn/prefer-spread": "off",
"unicorn/prevent-abbreviations": "off"
}
}
-14
View File
@@ -1,14 +0,0 @@
{
"env": {
"browser": false,
"node": true
},
"parserOptions": {
"sourceType": "script"
},
"extends": "../.eslintrc.json",
"rules": {
"no-console": "off",
"strict": "error"
}
}
-13
View File
@@ -1,13 +0,0 @@
{
"extends": [
"../../../.eslintrc.json"
],
"env": {
"jasmine": true
},
"rules": {
"unicorn/consistent-function-scoping": "off",
"unicorn/no-useless-undefined": "off",
"unicorn/prefer-add-event-listener": "off"
}
}
+4540 -5
View File
File diff suppressed because it is too large Load Diff
+104 -6
View File
@@ -41,7 +41,7 @@
"js-compile-standalone-esm": "rollup --environment ESM:true,BUNDLE:false --config build/rollup.config.js --sourcemap",
"js-compile-bundle": "rollup --environment BUNDLE:true --config build/rollup.config.js --sourcemap",
"js-compile-plugins": "node build/build-plugins.js",
"js-lint": "eslint --cache --cache-location .cache/.eslintcache --report-unused-disable-directives .",
"js-lint": "xo",
"js-minify": "npm-run-all --aggregate-output --parallel js-minify-*",
"js-minify-standalone": "terser --compress passes=2 --mangle --comments \"/^!/\" --source-map \"content=dist/js/bootstrap.js.map,includeSources,url=bootstrap.min.js.map\" --output dist/js/bootstrap.min.js dist/js/bootstrap.js",
"js-minify-standalone-esm": "terser --compress passes=2 --mangle --comments \"/^!/\" --source-map \"content=dist/js/bootstrap.esm.js.map,includeSources,url=bootstrap.esm.min.js.map\" --output dist/js/bootstrap.esm.min.js dist/js/bootstrap.esm.js",
@@ -113,10 +113,6 @@
"clean-css-cli": "^5.4.2",
"cross-env": "^7.0.3",
"cspell": "^5.13.1",
"eslint": "^8.3.0",
"eslint-config-xo": "^0.39.0",
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-unicorn": "^39.0.0",
"find-unused-sass-variables": "^3.1.0",
"glob": "^7.2.0",
"globby": "^11.0.4",
@@ -147,7 +143,8 @@
"stylelint": "^13.13.1",
"stylelint-config-twbs-bootstrap": "^2.2.4",
"terser": "^5.10.0",
"vnu-jar": "21.10.12"
"vnu-jar": "21.10.12",
"xo": "^0.47.0"
},
"files": [
"dist/{css,js}/*.{css,js,map}",
@@ -174,5 +171,106 @@
"peerDependencies": {
"@popperjs/core": "^2.11.0"
}
},
"xo": {
"envs": [
"browser"
],
"semicolon": false,
"space": 2,
"ignores": [
"**/*.min.js",
"**/dist/**",
"**/vendor/**",
"site/static/sw.js"
],
"rules": {
"arrow-body-style": "off",
"capitalized-comments": "off",
"comma-dangle": [
"error",
"never"
],
"import/extensions": "off",
"max-params": [
"warn",
5
],
"new-cap": [
"error",
{
"properties": false
}
],
"no-console": "error",
"no-negated-condition": "off",
"node/file-extension-in-import": "off",
"object-curly-spacing": [
"error",
"always"
],
"operator-linebreak": [
"error",
"after"
],
"prefer-template": "error",
"unicorn/explicit-length-check": "off",
"unicorn/no-array-callback-reference": "off",
"unicorn/no-array-method-this-argument": "off",
"unicorn/no-unused-properties": "error",
"unicorn/numeric-separators-style": "off",
"unicorn/prefer-array-flat": "off",
"unicorn/prefer-dom-node-dataset": "off",
"unicorn/prefer-module": "off",
"unicorn/prefer-query-selector": "off",
"unicorn/prefer-spread": "off",
"unicorn/prevent-abbreviations": "off"
},
"overrides": [
{
"files": "build/*.js",
"envs": [
"node"
],
"parserOptions": {
"sourceType": "script"
},
"rules": {
"no-console": "off",
"strict": "error"
}
},
{
"files": "js/tests/unit/**/*.spec.js",
"envs": [
"jasmine"
],
"rules": {
"unicorn/consistent-function-scoping": "off",
"unicorn/no-useless-undefined": "off",
"unicorn/prefer-add-event-listener": "off"
}
},
{
"files": "site/**/*.js",
"parserOptions": {
"ecmaVersion": 5,
"sourceType": "script"
},
"rules": {
"no-new": "off",
"no-var": "off",
"object-shorthand": "off",
"prefer-arrow-callback": "off",
"prefer-template": "off",
"strict": [
"error",
"function"
],
"unicorn/no-array-for-each": "off",
"unicorn/no-for-loop": "off"
}
}
]
}
}
-61
View File
@@ -1,61 +0,0 @@
{
"root": true,
"parserOptions": {
"ecmaVersion": 5,
"sourceType": "script"
},
"extends": [
"plugin:unicorn/recommended",
"xo",
"xo/browser"
],
"rules": {
"arrow-body-style": "off",
"capitalized-comments": "off",
"comma-dangle": [
"error",
"never"
],
"indent": [
"error",
2,
{
"MemberExpression": "off",
"SwitchCase": 1
}
],
"multiline-ternary": [
"error",
"always-multiline"
],
"no-negated-condition": "off",
"no-new": "off",
"no-var": "off",
"object-curly-spacing": [
"error",
"always"
],
"object-shorthand": "off",
"operator-linebreak": [
"error",
"after"
],
"prefer-arrow-callback": "off",
"prefer-destructuring": "off",
"semi": [
"error",
"never"
],
"strict": "error",
"unicorn/no-array-for-each": "off",
"unicorn/no-array-method-this-argument": "off",
"unicorn/no-for-loop": "off",
"unicorn/no-null": "off",
"unicorn/numeric-separators-style": "off",
"unicorn/prefer-array-flat": "off",
"unicorn/prefer-dom-node-dataset": "off",
"unicorn/prefer-module": "off",
"unicorn/prefer-query-selector": "off",
"unicorn/prevent-abbreviations": "off"
}
}