mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 11:50:00 +00:00
Reactivate eslint-plugin-package-json (#3643)
Somehow the plugin get lost when we moved to ESLint flat config. Now I reactivated it. One rules caused sorting the scripts. If this is not okay, I can undo this and switch off the rule. Thank's @bugsounet for the pinging in https://github.com/MagicMirrorOrg/MagicMirror/pull/3637#issuecomment-2509771362.
This commit is contained in:
parent
8d61336e8b
commit
07768c3a88
@ -14,11 +14,12 @@ _This release is scheduled to be released on 2025-01-01._
|
|||||||
### Added
|
### Added
|
||||||
|
|
||||||
- [core] Add wayland and windows start options to `package.json` (#3594)
|
- [core] Add wayland and windows start options to `package.json` (#3594)
|
||||||
- [linter] re-added `eslint-plugin-import`now that it supports ESLint v9 (#3586)
|
- [docs] Add step for npm publishing in release process (#3595)
|
||||||
- [docs] Added step for npm publishing in release process (#3595)
|
- [core] Add GitHub workflow to run spellcheck a few days before each release (#3623)
|
||||||
- [core] Add GitHub workflow to run spellcheck a few days before each release.
|
|
||||||
- [core] Add intest flag to index.html to pass to module js for test mode detection (needed by #3630)
|
- [core] Add intest flag to index.html to pass to module js for test mode detection (needed by #3630)
|
||||||
- [compliments] add support for refreshing remote compliments file, and testcases
|
- [compliments] add support for refreshing remote compliments file, and testcases (#3630)
|
||||||
|
- [linter] Re-add `eslint-plugin-import`now that it supports ESLint v9 (#3586)
|
||||||
|
- [linter] Re-activate `eslint-plugin-package-json` to lint `package.json`
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
|
@ -1,12 +1,14 @@
|
|||||||
import eslintPluginImport from "eslint-plugin-import";
|
import eslintPluginImport from "eslint-plugin-import";
|
||||||
import eslintPluginJest from "eslint-plugin-jest";
|
import eslintPluginJest from "eslint-plugin-jest";
|
||||||
import eslintPluginJs from "@eslint/js";
|
import eslintPluginJs from "@eslint/js";
|
||||||
|
import eslintPluginPackageJson from "eslint-plugin-package-json/configs/recommended";
|
||||||
import eslintPluginStylistic from "@stylistic/eslint-plugin";
|
import eslintPluginStylistic from "@stylistic/eslint-plugin";
|
||||||
import globals from "globals";
|
import globals from "globals";
|
||||||
|
|
||||||
const config = [
|
const config = [
|
||||||
eslintPluginJs.configs.recommended,
|
eslintPluginJs.configs.recommended,
|
||||||
eslintPluginImport.flatConfigs.recommended,
|
eslintPluginImport.flatConfigs.recommended,
|
||||||
|
eslintPluginPackageJson,
|
||||||
{
|
{
|
||||||
files: ["**/*.js"],
|
files: ["**/*.js"],
|
||||||
languageOptions: {
|
languageOptions: {
|
||||||
@ -106,6 +108,7 @@ const config = [
|
|||||||
"@stylistic/quote-props": ["error", "as-needed"],
|
"@stylistic/quote-props": ["error", "as-needed"],
|
||||||
"func-style": "off",
|
"func-style": "off",
|
||||||
"import/namespace": "off",
|
"import/namespace": "off",
|
||||||
|
"import/no-unresolved": "off",
|
||||||
"max-lines-per-function": ["error", 100],
|
"max-lines-per-function": ["error", 100],
|
||||||
"no-magic-numbers": "off",
|
"no-magic-numbers": "off",
|
||||||
"one-var": "off",
|
"one-var": "off",
|
||||||
|
38
package.json
38
package.json
@ -24,6 +24,18 @@
|
|||||||
],
|
],
|
||||||
"main": "js/electron.js",
|
"main": "js/electron.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"config:check": "node js/check_config.js",
|
||||||
|
"install-fonts": "echo \"Installing fonts ...\n\" && cd fonts && npm install --loglevel=error --no-audit --no-fund --no-update-notifier",
|
||||||
|
"install-mm": "npm install --no-audit --no-fund --no-update-notifier --only=prod --omit=dev",
|
||||||
|
"install-mm:dev": "npm install --no-audit --no-fund --no-update-notifier",
|
||||||
|
"install-vendor": "echo \"Installing vendor files ...\n\" && cd vendor && npm install --loglevel=error --no-audit --no-fund --no-update-notifier",
|
||||||
|
"lint:css": "stylelint 'css/main.css' 'fonts/*.css' 'modules/default/**/*.css' 'vendor/*.css' --config .stylelintrc.json --fix",
|
||||||
|
"lint:js": "eslint . --fix",
|
||||||
|
"lint:prettier": "prettier . --write",
|
||||||
|
"lint:staged": "lint-staged",
|
||||||
|
"postinstall": "npm run install-vendor && npm run install-fonts && echo \"MagicMirror² installation finished successfully! \n\"",
|
||||||
|
"prepare": "[ -f node_modules/.bin/husky ] && husky || echo no husky installed.",
|
||||||
|
"server": "node ./serveronly",
|
||||||
"start": "npm run start:x11",
|
"start": "npm run start:x11",
|
||||||
"start:dev": "npm run start -- dev",
|
"start:dev": "npm run start -- dev",
|
||||||
"start:wayland": "WAYLAND_DISPLAY=\"${WAYLAND_DISPLAY:=wayland-1}\" ./node_modules/.bin/electron js/electron.js --enable-features=UseOzonePlatform --ozone-platform=wayland",
|
"start:wayland": "WAYLAND_DISPLAY=\"${WAYLAND_DISPLAY:=wayland-1}\" ./node_modules/.bin/electron js/electron.js --enable-features=UseOzonePlatform --ozone-platform=wayland",
|
||||||
@ -32,28 +44,16 @@
|
|||||||
"start:windows:dev": "npm run start:windows -- dev",
|
"start:windows:dev": "npm run start:windows -- dev",
|
||||||
"start:x11": "DISPLAY=\"${DISPLAY:=:0}\" ./node_modules/.bin/electron js/electron.js",
|
"start:x11": "DISPLAY=\"${DISPLAY:=:0}\" ./node_modules/.bin/electron js/electron.js",
|
||||||
"start:x11:dev": "npm run start -- dev",
|
"start:x11:dev": "npm run start -- dev",
|
||||||
"server": "node ./serveronly",
|
|
||||||
"install-mm": "npm install --no-audit --no-fund --no-update-notifier --only=prod --omit=dev",
|
|
||||||
"install-mm:dev": "npm install --no-audit --no-fund --no-update-notifier",
|
|
||||||
"install-vendor": "echo \"Installing vendor files ...\n\" && cd vendor && npm install --loglevel=error --no-audit --no-fund --no-update-notifier",
|
|
||||||
"install-fonts": "echo \"Installing fonts ...\n\" && cd fonts && npm install --loglevel=error --no-audit --no-fund --no-update-notifier",
|
|
||||||
"postinstall": "npm run install-vendor && npm run install-fonts && echo \"MagicMirror² installation finished successfully! \n\"",
|
|
||||||
"test": "NODE_ENV=test jest -i --forceExit",
|
"test": "NODE_ENV=test jest -i --forceExit",
|
||||||
"test:coverage": "NODE_ENV=test jest --coverage -i --verbose false --forceExit",
|
|
||||||
"test:electron": "NODE_ENV=test jest --selectProjects electron -i --forceExit",
|
|
||||||
"test:e2e": "NODE_ENV=test jest --selectProjects e2e -i --forceExit",
|
|
||||||
"test:unit": "NODE_ENV=test jest --selectProjects unit",
|
|
||||||
"test:prettier": "prettier . --check",
|
|
||||||
"test:js": "eslint .",
|
|
||||||
"test:css": "stylelint 'css/main.css' 'fonts/*.css' 'modules/default/**/*.css' 'vendor/*.css' --config .stylelintrc.json",
|
|
||||||
"test:calendar": "node ./modules/default/calendar/debug.js",
|
"test:calendar": "node ./modules/default/calendar/debug.js",
|
||||||
|
"test:coverage": "NODE_ENV=test jest --coverage -i --verbose false --forceExit",
|
||||||
|
"test:css": "stylelint 'css/main.css' 'fonts/*.css' 'modules/default/**/*.css' 'vendor/*.css' --config .stylelintrc.json",
|
||||||
|
"test:e2e": "NODE_ENV=test jest --selectProjects e2e -i --forceExit",
|
||||||
|
"test:electron": "NODE_ENV=test jest --selectProjects electron -i --forceExit",
|
||||||
|
"test:js": "eslint .",
|
||||||
|
"test:prettier": "prettier . --check",
|
||||||
"test:spelling": "cspell . --gitignore",
|
"test:spelling": "cspell . --gitignore",
|
||||||
"config:check": "node js/check_config.js",
|
"test:unit": "NODE_ENV=test jest --selectProjects unit"
|
||||||
"lint:prettier": "prettier . --write",
|
|
||||||
"lint:js": "eslint . --fix",
|
|
||||||
"lint:css": "stylelint 'css/main.css' 'fonts/*.css' 'modules/default/**/*.css' 'vendor/*.css' --config .stylelintrc.json --fix",
|
|
||||||
"lint:staged": "lint-staged",
|
|
||||||
"prepare": "[ -f node_modules/.bin/husky ] && husky || echo no husky installed."
|
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"*": "prettier --write",
|
"*": "prettier --write",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user