From bbba04a149f29755be637188a1f480a3ec228807 Mon Sep 17 00:00:00 2001 From: Jason Miller Date: Tue, 4 Jul 2023 13:27:38 -0400 Subject: move eslint config out of package.json and add prettier --- .eslintrc | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ package.json | 46 ++++++++-------------------------------------- 2 files changed, 60 insertions(+), 38 deletions(-) create mode 100644 .eslintrc diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 0000000..429b835 --- /dev/null +++ b/.eslintrc @@ -0,0 +1,52 @@ +{ + "ignorePatterns": [ + "node_modules", + "dist", + "index.d.ts" + ], + "extends": [ + "plugin:@typescript-eslint/eslint-recommended", + "plugin:@typescript-eslint/recommended", + "developit" + ], + "parser": "@typescript-eslint/parser", + "parserOptions": { + "sourceType": "module" + }, + "env": { + "browser": true, + "mocha": true, + "jest": false, + "es6": true + }, + "globals": { + "expect": true + }, + "rules": { + "semi": [ + 2, + "always" + ], + "brace-style": [ + 2, + "1tbs" + ], + "quotes": [ + 2, + "single" + ], + "lines-around-comment": [ + 2, + { + "allowBlockStart": true, + "allowObjectStart": true + } + ], + "jest/valid-expect": 0, + "@typescript-eslint/no-explicit-any": 0, + "@typescript-eslint/explicit-function-return-type": 0, + "@typescript-eslint/explicit-module-boundary-types": 0, + "@typescript-eslint/no-empty-function": 0, + "@typescript-eslint/no-non-null-assertion": 0 + } +} diff --git a/package.json b/package.json index a989165..78c89e0 100644 --- a/package.json +++ b/package.json @@ -54,57 +54,27 @@ "test/*_test.ts" ] }, - "eslintConfig": { - "extends": [ - "developit", - "plugin:@typescript-eslint/eslint-recommended", - "plugin:@typescript-eslint/recommended" - ], - "parser": "@typescript-eslint/parser", - "parserOptions": { - "sourceType": "module" - }, - "env": { - "browser": true, - "mocha": true, - "jest": false, - "es6": true + "prettier": { + "singleQuote": true, + "trailingComma": "none" }, - "globals": { - "expect": true - }, - "rules": { - "semi": [ - 2, - "always" - ], - "jest/valid-expect": 0, - "@typescript-eslint/no-explicit-any": 0, - "@typescript-eslint/explicit-function-return-type": 0, - "@typescript-eslint/explicit-module-boundary-types": 0, - "@typescript-eslint/no-empty-function": 0, - "@typescript-eslint/no-non-null-assertion": 0 - } - }, - "eslintIgnore": [ - "dist", - "index.d.ts" - ], "devDependencies": { "@types/chai": "^4.2.11", "@types/mocha": "^7.0.2", "@types/sinon": "^9.0.4", "@types/sinon-chai": "^3.2.4", - "@typescript-eslint/eslint-plugin": "^3.0.1", - "@typescript-eslint/parser": "^3.0.1", + "@typescript-eslint/eslint-plugin": "^5.61.0", + "@typescript-eslint/parser": "^5.61.0", "chai": "^4.2.0", "documentation": "^14.0.2", - "eslint": "^7.1.0", + "eslint": "^7.32.0", "eslint-config-developit": "^1.2.0", + "eslint-plugin-compat": "^4.1.4", "esm": "^3.2.25", "microbundle": "^0.12.3", "mocha": "^8.0.1", "npm-run-all": "^4.1.5", + "prettier": "^2.8.8", "rimraf": "^3.0.2", "sinon": "^9.0.2", "sinon-chai": "^3.5.0", -- cgit v1.2.3