Skip to content

Commit

Permalink
chore: upgrade lint tools (#2720)
Browse files Browse the repository at this point in the history
* chore: update lint tools

* chore: fix eslint recommended lint warnings in js files

* chore: enable prettier, unicorn, and sonar rules

* chore: fix stylelint warnings, apply new prettier version

* chore: better match preview formatting to reduce diff

* chore: remove unused ternary

* chore: use prefix media query notation

* chore: don't use for of loops, they break resource server
  • Loading branch information
ChristianMurphy committed Nov 10, 2023
1 parent 77e84f9 commit 2b03f4a
Show file tree
Hide file tree
Showing 40 changed files with 2,669 additions and 1,789 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ logbackVersion=1.3.5
lombokVersion=1.18.30
mockitoVersion=4.11.0
luceneVersion=8.11.2
nodejsVersion=18.17.1
nodejsVersion=20.9.0
oauthVersion=20100527
orgJsonVersion=20231013
personDirectoryVersion=1.8.11
Expand Down
1,862 changes: 1,442 additions & 420 deletions package-lock.json

Large diffs are not rendered by default.

96 changes: 59 additions & 37 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,24 @@
"name": "uportal",
"private": true,
"devDependencies": {
"eslint": "^8.43.0",
"eslint-config-google": "^0.14.0",
"eslint-config-prettier": "^8.0.0",
"eslint": "^8.53.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-sonarjs": "^0.23.0",
"eslint-plugin-unicorn": "^49.0.0",
"postcss-less": "^6.0.0",
"prettier": "~3.0.0",
"remark-cli": "^11.0.0",
"remark-preset-lint-consistent": "^5.0.0",
"remark-preset-lint-recommended": "^6.0.0",
"remark-validate-links": "^12.0.0",
"stylelint": "^14.0.0",
"stylelint-config-prettier": "^9.0.0",
"stylelint-config-standard": "^29.0.0",
"stylelint-prettier": "^2.0.0"
"stylelint": "^15.0.0",
"stylelint-config-standard-less": "^2.0.0",
"stylelint-prettier": "^4.0.0"
},
"workspaces": [
"uPortal-webapp/"
],
"scripts": {
"lint-js": "eslint . --ignore-path .gitignore --ignore-pattern *.min.js",
"lint-less": "stylelint **/*.less !**/bootstrap/**/*.less !**/build/**/*.less",
Expand All @@ -25,41 +29,39 @@
},
"eslintConfig": {
"extends": [
"google",
"prettier"
"eslint:recommended",
"plugin:sonarjs/recommended",
"plugin:unicorn/recommended",
"plugin:prettier/recommended"
],
"env": {
"es2023": true,
"browser": true
},
"globals": {
"jQuery": false,
"$": false,
"_": false,
"up": false,
"fluid": false
},
"rules": {
"indent": [
"no-redeclare": [
"error",
4
],
"max-len": [
"warn",
{
"code": 80,
"tabWidth": 4,
"ignoreUrls": true,
"ignoreComments": true,
"ignoreStrings": true
"builtinGlobals": false
}
],
"new-cap": "warn",
"arrow-parens": "off",
"constructor-super": "off",
"generator-star-spacing": "off",
"no-new-symbol": "off",
"no-this-before-super": "off",
"no-invalid-this": "off",
"no-var": "off",
"prefer-rest-params": "off",
"prefer-spread": "off",
"valid-jsdoc": "warn",
"rest-spread-spacing": "off",
"yield-star-spacing": "off"
"sonarjs/cognitive-complexity": "off",
"sonarjs/no-duplicate-string": "off",
"unicorn/filename-case": "off",
"unicorn/no-array-callback-reference": "off",
"unicorn/no-for-loop": "off",
"unicorn/no-null": "off",
"unicorn/no-this-assignment": "off",
"unicorn/numeric-separators-style": "off",
"unicorn/prefer-module": "off",
"unicorn/prefer-spread": "off"
}
},
"remarkConfig": {
Expand All @@ -71,16 +73,36 @@
"stylelint": {
"customSyntax": "postcss-less",
"extends": [
"stylelint-config-standard",
"stylelint-config-standard-less",
"stylelint-prettier/recommended"
],
"rules": {
"no-invalid-position-at-import-rule": null,
"at-rule-no-unknown": null,
"declaration-block-no-shorthand-property-overrides": null,
"function-no-unknown": null,
"less/no-duplicate-variables": null,
"media-feature-range-notation": [
"prefix"
],
"media-query-no-invalid": null,
"no-descending-specificity": null,
"selector-id-pattern": null,
"no-invalid-position-at-import-rule": null,
"prettier/prettier": [
true,
{
"singleQuote": false,
"tabWidth": 2
}
],
"property-no-unknown": null,
"selector-class-pattern": null,
"function-no-unknown": null
"selector-id-pattern": null
}
},
"prettier": {}
"prettier": {
"singleQuote": true,
"bracketSpacing": false,
"trailingComma": "es5",
"tabWidth": 4
}
}
166 changes: 0 additions & 166 deletions uPortal-webapp/package-lock.json

This file was deleted.

Loading

0 comments on commit 2b03f4a

Please sign in to comment.