mirror of https://github.com/xwiki-labs/cryptpad
Replace lesshint dev dependency
This commit is contained in:
parent
3d7a886475
commit
f823e421e7
60
.lesshintrc
60
.lesshintrc
|
@ -1,60 +0,0 @@
|
|||
{
|
||||
"fileExtensions": [".less"],
|
||||
|
||||
// These rules are almost certainly crap and will not catch bugs (Caleb)
|
||||
"newlineAfterBlock": { "enabled": false }, // not just a newline but an entire empty line after each block
|
||||
"spaceAroundOperator": { "enabled": false }, // disallow calc(10px+10px);
|
||||
"hexLength": { "enabled": false }, // require long hex color codes or require short where possible
|
||||
"hexNotation": { "enabled": false }, // require hex lowercase
|
||||
"propertyOrdering": { "enabled": false }, // require attributes to be in alphabetical order D:
|
||||
"stringQuotes": { "enabled": false }, // force quoting of strings with ' or " (silly)
|
||||
"importPath": { "enabled": false }, // require imports to not have .less, ridiculous
|
||||
"qualifyingElement": { "enabled": false }, // disallow div.xxx and require .xxx
|
||||
"decimalZero": { "enabled": false }, // disallow .5em
|
||||
"borderZero": { "enabled": false }, // disallow border: none;
|
||||
"selectorNaming": { "enabled": false }, // this would be crap because classes are what they are.
|
||||
"zeroUnit": { "enabled": false },
|
||||
"singleLinePerProperty": { "enabled": false },
|
||||
"_singleLinePerProperty": {
|
||||
"enabled": true,
|
||||
"allowSingleLineRules": true
|
||||
},
|
||||
"spaceAroundComma": { "enabled": false },
|
||||
"importantRule": { "enabled": false },
|
||||
"universalSelector": { "enabled": false },
|
||||
"idSelector": { "enabled": false },
|
||||
"singleLinePerSelector": { "enabled": false },
|
||||
"spaceBetweenParens": { "enabled": false },
|
||||
"maxCharPerLine": { "enabled": false }, // using lesshint flags can cause long lines
|
||||
"comment": { "enabled": false }, // ban multi-line comments ?
|
||||
|
||||
// These rules should be discussed, if they're crap then they should be moved up.
|
||||
"colorVariables": { "enabled": false }, // require all colors to be stored as variables first...
|
||||
"variableValue": { "enabled": false }, // any attribute types which should always be variables ? color?
|
||||
"spaceBeforeBrace": { "enabled": true },//{ "enabled": true, "style": "one_space" },
|
||||
|
||||
// Turn everything else on
|
||||
"spaceAfterPropertyColon": { "enabled": true },
|
||||
"finalNewline": { "enabled": true }, // require an empty line at the end of the file (enabled for now)
|
||||
"attributeQuotes": { "enabled": true },
|
||||
"depthLevel": {
|
||||
"depth": 1 // TODO(cjd) This is obviously not triggering, even with 1
|
||||
},
|
||||
"duplicateProperty": { "enabled": false },
|
||||
"emptyRule": { "enabled": true },
|
||||
"hexValidation": { "enabled": true }, // disallow actual garbage color hex codes (e.g. #ab)
|
||||
"propertyUnits": {
|
||||
"valid": ["rem", "vw", "em", "px", "ch"], // These units are allowed for all properties
|
||||
"invalid": ["pt"], // The 'pt' unit is not allowed under any circumstances
|
||||
"properties": {
|
||||
//"line-height": [] // No units are allowed for line-height
|
||||
}
|
||||
},
|
||||
"spaceAfterPropertyName": { "enabled": true, "style": "no_space" },
|
||||
"spaceAfterPropertyValue": { "enabled": true, "style": "no_space" },
|
||||
"spaceAroundBang": { "enabled": true, "style": "before" },
|
||||
"trailingSemicolon": { "enabled": true },
|
||||
"trailingWhitespace": { "enabled": true },
|
||||
"urlFormat": { "enabled": true, "style": "relative" },
|
||||
"urlQuotes": { "enabled": true }
|
||||
}
|
|
@ -25,7 +25,7 @@ Files: .jshintrc
|
|||
Copyright: 2023 XWiki CryptPad Team <contact@cryptpad.org> and contributors
|
||||
License: AGPL-3.0-or-later
|
||||
|
||||
Files: .lesshintrc
|
||||
Files: .stylelintrc.js
|
||||
Copyright: 2023 XWiki CryptPad Team <contact@cryptpad.org> and contributors
|
||||
License: AGPL-3.0-or-later
|
||||
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
module.exports = {
|
||||
"extends": "stylelint-config-standard-less",
|
||||
"rules": {
|
||||
"no-descending-specificity": null,
|
||||
"length-zero-no-unit": null,
|
||||
"no-duplicate-selectors": null,
|
||||
"declaration-block-no-duplicate-properties": null,
|
||||
|
||||
"comment-empty-line-before": null,
|
||||
"rule-empty-line-before": null,
|
||||
"declaration-empty-line-before": null,
|
||||
"at-rule-empty-line-before": null,
|
||||
"custom-property-empty-line-before": null,
|
||||
|
||||
"font-family-name-quotes": null,
|
||||
"font-family-no-missing-generic-family-keyword": null,
|
||||
"declaration-block-no-redundant-longhand-properties": null,
|
||||
"shorthand-property-no-redundant-values": null,
|
||||
"declaration-block-no-shorthand-property-overrides": null,
|
||||
|
||||
"comment-whitespace-inside": null,
|
||||
|
||||
"property-no-vendor-prefix": null,
|
||||
"selector-no-vendor-prefix": null,
|
||||
"function-name-case": null,
|
||||
"selector-class-pattern": null,
|
||||
"custom-property-pattern": null,
|
||||
"selector-id-pattern": null,
|
||||
|
||||
"selector-pseudo-element-colon-notation": null,
|
||||
"media-feature-range-notation": null,
|
||||
"selector-not-notation": null,
|
||||
"color-function-notation": null,
|
||||
"alpha-value-notation": null,
|
||||
|
||||
"number-max-precision": null,
|
||||
|
||||
"at-rule-no-unknown": null, // FIXME
|
||||
|
||||
"less/no-duplicate-variables": null,
|
||||
"less/color-no-invalid-hex": null
|
||||
}
|
||||
};
|
File diff suppressed because it is too large
Load Diff
11
package.json
11
package.json
|
@ -69,7 +69,8 @@
|
|||
"devDependencies": {
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-plugin-compat": "^4.2.0",
|
||||
"lesshint": "6.3.7"
|
||||
"stylelint": "^16.6.1",
|
||||
"stylelint-config-standard-less": "^3.0.1"
|
||||
},
|
||||
"overrides": {
|
||||
"glob-parent": "5.1.2",
|
||||
|
@ -86,9 +87,9 @@
|
|||
"offline": "FRESH=1 OFFLINE=1 node server.js",
|
||||
"offlinedev": "DEV=1 OFFLINE=1 node server.js",
|
||||
"package": "PACKAGE=1 node server.js",
|
||||
"lint": "eslint . && ./node_modules/lesshint/bin/lesshint -c ./.lesshintrc ./customize.dist/src/less2/",
|
||||
"lint": "eslint . && stylelint \"./customize.dist/src/less2/**/*.less\"",
|
||||
"lint:js": "eslint .",
|
||||
"lint:less": "./node_modules/lesshint/bin/lesshint -c ./.lesshintrc ./customize.dist/src/less2/",
|
||||
"lint:less": "stylelint \"./customize.dist/src/less2/**/*.less\"",
|
||||
"lint:translations": "node ./scripts/translations/lint-translations.js",
|
||||
"unused-translations": "node ./scripts/translations/unused-translations.js",
|
||||
"test": "node scripts/TestSelenium.js",
|
||||
|
@ -98,5 +99,7 @@
|
|||
"clear": "node scripts/clear.js",
|
||||
"installtoken": "node scripts/install.js"
|
||||
},
|
||||
"browserslist": ["> 0.5%, last 2 versions, Firefox ESR, not dead, not op_mini all"]
|
||||
"browserslist": [
|
||||
"> 0.5%, last 2 versions, Firefox ESR, not dead, not op_mini all"
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue