diff --git a/.commitlintrc.js b/.commitlintrc.js deleted file mode 100644 index 02c2dc5..0000000 --- a/.commitlintrc.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = { - extends: ["@commitlint/config-conventional"], - rules: { - "header-max-length": [0, "always", 50], - "body-max-line-length": [0, "always", 72], - "footer-max-line-length": [0, "always", 72], - }, -}; diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index ecc81f4..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1,36 +0,0 @@ -module.exports = { - env: { - es6: true, - node: true, - jest: true, - }, - plugins: ["@typescript-eslint", "security"], - extends: [ - "eslint:recommended", - "plugin:security/recommended", - "plugin:@typescript-eslint/eslint-recommended", - "plugin:@typescript-eslint/recommended", - "prettier", - "prettier/@typescript-eslint", - ], - globals: { - Atomics: "readonly", - SharedArrayBuffer: "readonly", - }, - parser: "@typescript-eslint/parser", - parserOptions: { - ecmaVersion: 2018, - sourceType: "module", - }, - rules: {}, - ignorePatterns: ["dist"], - overrides: [ - { - files: ["{db,support,config}/**/*.js"], - rules: { - "@typescript-eslint/explicit-function-return-type": "off", - "@typescript-eslint/no-var-requires": "off", - }, - }, - ], -}; diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index 009af54..0000000 --- a/.prettierignore +++ /dev/null @@ -1,2 +0,0 @@ -dist -coverage diff --git a/.prettierrc.js b/.prettierrc.js deleted file mode 100644 index 15f0d48..0000000 --- a/.prettierrc.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - trailingComma: "all", -}; diff --git a/jest.config.js b/jest.config.js deleted file mode 100644 index b057718..0000000 --- a/jest.config.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = { - preset: "ts-jest", - testEnvironment: "node", - testPathIgnorePatterns: ["/config", "/dist"], - setupFiles: ["/support/setup-jest.ts"], -}; diff --git a/package.json b/package.json index bbec9cc..146f66e 100644 --- a/package.json +++ b/package.json @@ -2,29 +2,12 @@ "name": "utom.is", "version": "0.0.0", "private": true, - "husky": { - "hooks": { - "pre-commit": "lint-staged", - "commit-msg": "commitlint -E HUSKY_GIT_PARAMS" - } - }, - "lint-staged": { - "*.{js,jsx,ts,tsx,md,json,yml,css,html}": [ - "prettier --write", - "git add" - ], - "*.{ts,js}": [ - "eslint --fix", - "jest --bail --findRelatedTests", - "git add" - ] - }, "scripts": { "start": "node ./start", "start:dev": "ts-node ./start", "test": "jest", "check:eslint": "eslint --ext=js,ts .", - "check:prettier": "prettier --check '**/*.{js,jsx,ts,tsx,md,json,yml,css,html}'", + "check:prettier": "prettier --ignore-path '.gitignore' --check '**/*.{js,jsx,ts,tsx,md,json,yml,css,html}'", "check:tsc": "tsc --noEmit", "build-tsc": "tsc --build", "remove-dist": "ts-node support/remove-dist.ts", @@ -86,5 +69,101 @@ "ts-jest": "^25.2.1", "ts-node": "^8.6.2", "typescript": "^3.8.3" + }, + "eslintConfig": { + "env": { + "es6": true, + "node": true, + "jest": true + }, + "plugins": [ + "@typescript-eslint", + "security" + ], + "extends": [ + "eslint:recommended", + "plugin:security/recommended", + "plugin:@typescript-eslint/eslint-recommended", + "plugin:@typescript-eslint/recommended", + "prettier", + "prettier/@typescript-eslint" + ], + "globals": { + "Atomics": "readonly", + "SharedArrayBuffer": "readonly" + }, + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaVersion": 2018, + "sourceType": "module" + }, + "rules": {}, + "ignorePatterns": [ + "dist" + ], + "overrides": [ + { + "files": [ + "{db,support,config}/**/*.js" + ], + "rules": { + "@typescript-eslint/explicit-function-return-type": "off", + "@typescript-eslint/no-var-requires": "off" + } + } + ] + }, + "prettier": { + "trailingComma": "all" + }, + "commitlint": { + "extends": [ + "@commitlint/config-conventional" + ], + "rules": { + "header-max-length": [ + 0, + "always", + 50 + ], + "body-max-line-length": [ + 0, + "always", + 72 + ], + "footer-max-line-length": [ + 0, + "always", + 72 + ] + } + }, + "lint-staged": { + "*.{js,jsx,ts,tsx,md,json,yml,css,html}": [ + "prettier --write", + "git add" + ], + "*.{ts,js}": [ + "eslint --fix", + "jest --bail --findRelatedTests", + "git add" + ] + }, + "husky": { + "hooks": { + "pre-commit": "lint-staged", + "commit-msg": "commitlint -E HUSKY_GIT_PARAMS" + } + }, + "jest": { + "preset": "ts-jest", + "testEnvironment": "node", + "testPathIgnorePatterns": [ + "/config", + "/dist" + ], + "setupFiles": [ + "/support/setup-jest.ts" + ] } }