diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index b908c37..0000000 --- a/.eslintignore +++ /dev/null @@ -1,7 +0,0 @@ -node_modules -dist -coverage -**/*.d.ts -tests -venv -.venv diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5b59bb8..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1,40 +0,0 @@ -module.exports = { - extends: [ - 'eslint:recommended', - 'plugin:@typescript-eslint/eslint-recommended', - 'plugin:@typescript-eslint/recommended', - 'plugin:prettier/recommended', - ], - parser: '@typescript-eslint/parser', - parserOptions: { - project: 'tsconfig.json', - sourceType: 'module', - tsconfigRootDir: __dirname, - }, - plugins: ['@typescript-eslint'], - rules: { - '@typescript-eslint/naming-convention': [ - 'error', - { - selector: 'interface', - format: ['PascalCase'], - custom: { - regex: '^I[A-Z]', - match: true, - }, - }, - ], - '@typescript-eslint/no-unused-vars': ['warn', { args: 'none' }], - '@typescript-eslint/no-explicit-any': 'off', - '@typescript-eslint/no-namespace': 'off', - '@typescript-eslint/no-use-before-define': 'off', - '@typescript-eslint/quotes': [ - 'error', - 'single', - { avoidEscape: true, allowTemplateLiterals: false }, - ], - curly: ['error', 'all'], - eqeqeq: 'error', - 'prefer-arrow-callback': 'error', - }, -}; diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 544138b..0000000 --- a/.prettierrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "singleQuote": true -} diff --git a/.stylelintrc b/.stylelintrc deleted file mode 100644 index e78bce6..0000000 --- a/.stylelintrc +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": [ - "stylelint-config-recommended", - "stylelint-config-standard", - "stylelint-prettier/recommended" - ], - "rules": { - "no-empty-source": null, - "selector-class-pattern": null, - "property-no-vendor-prefix": null, - "selector-no-vendor-prefix": null, - "value-no-vendor-prefix": null - } -} diff --git a/package.json b/package.json index 7eafef3..ab1e6c2 100644 --- a/package.json +++ b/package.json @@ -39,10 +39,13 @@ "clean:lib": "rimraf lib tsconfig.tsbuildinfo", "eslint": "eslint . --ext .ts,.tsx --fix", "eslint:check": "eslint . --ext .ts,.tsx", - "lint": "jlpm run eslint && jlpm run prettier", - "lint:check": "jlpm run eslint:check && jlpm run prettier:check", + "lint": "jlpm run eslint && jlpm run prettier && jlpm stylelint", + "lint:check": "jlpm run eslint:check && jlpm run prettier:check && jlpm stylelint:check", "prettier": "prettier --write \"**/*{.ts,.tsx,.js,.jsx,.css,.json,.md}\"", "prettier:check": "prettier --list-different \"**/*{.ts,.tsx,.js,.jsx,.css,.json,.md}\"", + "stylelint": "jlpm stylelint:check --fix", + "stylelint:check": "stylelint --cache \"style/**/*.css\"", + "stylelint:files": "stylelint --fix", "install:extension": "jupyter labextension develop --overwrite .", "watch": "run-p watch:src watch:labextension", "watch:labextension": "jupyter labextension watch .", @@ -89,6 +92,72 @@ "outputDir": "jupyter_power_usage/labextension" }, "styleModule": "style/index.js", + "eslintIgnore": [ + "**/*.d.ts", + "dist", + "*node_modules*", + "coverage", + "tests", + "venv", + ".venv" + ], + "prettier": { + "singleQuote": true + }, + "eslintConfig": { + "extends": [ + "eslint:recommended", + "plugin:@typescript-eslint/eslint-recommended", + "plugin:@typescript-eslint/recommended", + "plugin:prettier/recommended" + ], + "parser": "@typescript-eslint/parser", + "parserOptions": { + "project": "tsconfig.json", + "sourceType": "module", + "tsconfigRootDir": "." + }, + "plugins": ["@typescript-eslint"], + "rules": { + "@typescript-eslint/naming-convention": [ + "error", + { + "selector": "interface", + "format": ["PascalCase"], + "custom": { + "regex": "^I[A-Z]", + "match": true + } + } + ], + "@typescript-eslint/no-unused-vars": ["warn", { "args": "none" }], + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-namespace": "off", + "@typescript-eslint/no-use-before-define": "off", + "@typescript-eslint/quotes": [ + "error", + "single", + { "avoidEscape": true, "allowTemplateLiterals": false } + ], + "curly": ["error", "all"], + "eqeqeq": "error", + "prefer-arrow-callback": "error" + } + }, + "stylelint": { + "extends": [ + "stylelint-config-recommended", + "stylelint-config-standard", + "stylelint-prettier/recommended" + ], + "rules": { + "no-empty-source": null, + "selector-class-pattern": null, + "property-no-vendor-prefix": null, + "selector-no-vendor-prefix": null, + "value-no-vendor-prefix": null + } + }, "//": [ "These are comments that will survive: https://groups.google.com/g/nodejs/c/NmL7jdeuw0M/m/yTqI05DRQrIJ?pli=1", "Nested deps in resolutions: https://github.com/yarnpkg/rfcs/blob/master/implemented/0000-selective-versions-resolutions.md#package-designation",