From cf8ba94f23489673593eb101dcab47af445054a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20B=C3=B6hm?= Date: Fri, 16 Sep 2022 08:57:15 +0200 Subject: [PATCH] feat(prettier)!: use tabs instead of spaces (#42) Resolves #34 --- .changeset/lemon-cheetahs-look.md | 6 ++ .changeset/light-llamas-smile.md | 5 ++ .editorconfig | 2 +- .eslintrc.cjs | 4 +- .github/renovate.json | 46 ++++++------ .husky/post-merge | 4 +- .prettierrc.cjs | 2 +- package.json | 97 ++++++++++++------------ packages/eslint-config/.eslintrc.cjs | 10 +-- packages/eslint-config/README.md | 48 ++++++------ packages/eslint-config/base.js | 92 +++++++++++------------ packages/eslint-config/next.js | 2 +- packages/eslint-config/package.json | 104 +++++++++++++------------- packages/eslint-config/react.js | 38 +++++----- packages/prettier-config/README.md | 52 ++++++------- packages/prettier-config/index.cjs | 55 +++++++------- packages/prettier-config/package.json | 86 ++++++++++----------- packages/tsconfig/base.json | 36 ++++----- packages/tsconfig/nextjs.json | 40 +++++----- packages/tsconfig/package.json | 18 ++--- packages/tsconfig/react-library.json | 18 ++--- pnpm-lock.yaml | 2 - scripts/prepare.ts | 2 +- tsconfig.json | 2 +- turbo.json | 24 +++--- 25 files changed, 401 insertions(+), 394 deletions(-) create mode 100644 .changeset/lemon-cheetahs-look.md create mode 100644 .changeset/light-llamas-smile.md diff --git a/.changeset/lemon-cheetahs-look.md b/.changeset/lemon-cheetahs-look.md new file mode 100644 index 0000000..1939f9f --- /dev/null +++ b/.changeset/lemon-cheetahs-look.md @@ -0,0 +1,6 @@ +--- +'@mheob/eslint-config': patch +'@mheob/prettier-config': patch +--- + +Format all files to the new tabs instead of spaces behaviour diff --git a/.changeset/light-llamas-smile.md b/.changeset/light-llamas-smile.md new file mode 100644 index 0000000..90445ed --- /dev/null +++ b/.changeset/light-llamas-smile.md @@ -0,0 +1,5 @@ +--- +'@mheob/prettier-config': major +--- + +Switch from spaces to tabs as indentation diff --git a/.editorconfig b/.editorconfig index 7a7bb15..68c0c4d 100644 --- a/.editorconfig +++ b/.editorconfig @@ -4,7 +4,7 @@ root = true [*] charset = utf-8 end_of_line = lf -indent_style = space +indent_style = tab indent_size = 2 insert_final_newline = true trim_trailing_whitespace = true diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 145e4d3..cf273e8 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -1,5 +1,5 @@ /** @type {import('eslint').ESLint.ConfigData} */ module.exports = { - root: true, - extends: ['@mheob/eslint-config'], + root: true, + extends: ['@mheob/eslint-config'], }; diff --git a/.github/renovate.json b/.github/renovate.json index 3d8bbfb..937da63 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -1,25 +1,25 @@ { - "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "extends": ["config:base"], - "labels": ["dependencies"], - "rangeStrategy": "replace", - "separateMajorMinor": true, - "dependencyDashboard": true, - "dependencyDashboardAutoclose": false, - "major": { - "dependencyDashboardApproval": true - }, - "stabilityDays": 3, - "prCreation": "not-pending", - "prConcurrentLimit": 5, - "timezone": "Europe/Berlin", - "schedule": ["before 5am on Wednesday"], - "packageRules": [ - { - "matchPackagePatterns": ["*"], - "matchUpdateTypes": ["minor", "patch"], - "groupName": "all non-major dependencies", - "groupSlug": "all-minor-patch" - } - ] + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": ["config:base"], + "labels": ["dependencies"], + "rangeStrategy": "replace", + "separateMajorMinor": true, + "dependencyDashboard": true, + "dependencyDashboardAutoclose": false, + "major": { + "dependencyDashboardApproval": true + }, + "stabilityDays": 3, + "prCreation": "not-pending", + "prConcurrentLimit": 5, + "timezone": "Europe/Berlin", + "schedule": ["before 5am on Wednesday"], + "packageRules": [ + { + "matchPackagePatterns": ["*"], + "matchUpdateTypes": ["minor", "patch"], + "groupName": "all non-major dependencies", + "groupSlug": "all-minor-patch" + } + ] } diff --git a/.husky/post-merge b/.husky/post-merge index e44472b..0a796b7 100755 --- a/.husky/post-merge +++ b/.husky/post-merge @@ -6,9 +6,9 @@ changedFiles="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)" hasChanged() { - echo "$changedFiles" | grep -q "$1" + echo "$changedFiles" | grep -q "$1" } if hasChanged 'pnpm-lock.yaml'; then - pnpm install + pnpm install fi diff --git a/.prettierrc.cjs b/.prettierrc.cjs index f51667b..a9a248a 100644 --- a/.prettierrc.cjs +++ b/.prettierrc.cjs @@ -1,3 +1,3 @@ module.exports = { - ...require('@mheob/prettier-config'), + ...require('@mheob/prettier-config'), }; diff --git a/package.json b/package.json index 9bbeee4..ad3a5df 100644 --- a/package.json +++ b/package.json @@ -1,51 +1,50 @@ { - "name": "@mheob/config", - "version": "0.0.0", - "private": true, - "license": "MIT", - "workspaces": [ - "packages/*" - ], - "scripts": { - "changeset": "changeset", - "clean": "turbo run clean", - "clean:root": "rm -rf .turbo && rm -rf node_modules", - "format": "prettier --write \"**/*.{cjs,js,jsx,ts,tsx,json,md,mdx,yml}\"", - "lint": "turbo run lint", - "prepare": "ts-node ./scripts/prepare.ts", - "release": "changeset publish", - "sort-package-json": "pnpm dlx sort-package-json && turbo run sort-package-json", - "version-packages": "changeset version" - }, - "commitlint": { - "extends": [ - "@commitlint/config-conventional" - ] - }, - "lint-staged": { - "*.{cjs,js,jsx,ts,tsx}": "eslint --fix", - "!(pnpm-)*.{cjs,js,jsx,ts,tsx,json,md,mdx,yml,yaml}": "pnpm exec prettier --write", - "**/package.json": "pnpm dlx sort-package-json" - }, - "devDependencies": { - "@changesets/cli": "^2.24.4", - "@commitlint/cli": "^17.1.2", - "@commitlint/config-conventional": "^17.1.0", - "@mheob/eslint-config": "workspace:*", - "@mheob/prettier-config": "workspace:*", - "@types/node": "^18.7.18", - "eslint": "^8.23.1", - "husky": "^8.0.0", - "is-ci": "^3.0.1", - "lint-staged": "^13.0.3", - "prettier": "^2.7.1", - "ts-node": "^10.9.1", - "turbo": "^1.4.6", - "typescript": "^4.8.3" - }, - "packageManager": "pnpm@7.11.0", - "engines": { - "node": ">=16.0.0", - "npm": ">=8.0.0" - } + "name": "@mheob/config", + "version": "0.0.0", + "private": true, + "license": "MIT", + "workspaces": [ + "packages/*" + ], + "scripts": { + "changeset": "changeset", + "clean": "turbo run clean", + "clean:root": "rm -rf .turbo && rm -rf node_modules", + "format": "prettier --write \"**/*.{cjs,js,jsx,ts,tsx,json,md,mdx,yml}\"", + "lint": "turbo run lint", + "prepare": "ts-node ./scripts/prepare.ts", + "release": "changeset publish", + "sort-package-json": "pnpm dlx sort-package-json && turbo run sort-package-json", + "version-packages": "changeset version" + }, + "commitlint": { + "extends": [ + "@commitlint/config-conventional" + ] + }, + "lint-staged": { + "*.{cjs,js,jsx,ts,tsx}": "eslint --fix", + "!(pnpm-)*.{cjs,js,jsx,ts,tsx,json,md,mdx,yml,yaml}": "pnpm exec prettier --write", + "**/package.json": "pnpm dlx sort-package-json" + }, + "devDependencies": { + "@changesets/cli": "^2.24.4", + "@commitlint/cli": "^17.1.2", + "@commitlint/config-conventional": "^17.1.0", + "@mheob/eslint-config": "workspace:*", + "@mheob/prettier-config": "workspace:*", + "@types/node": "^18.7.18", + "eslint": "^8.23.1", + "husky": "^8.0.0", + "lint-staged": "^13.0.3", + "prettier": "^2.7.1", + "ts-node": "^10.9.1", + "turbo": "^1.4.6", + "typescript": "^4.8.3" + }, + "packageManager": "pnpm@7.11.0", + "engines": { + "node": ">=16.0.0", + "npm": ">=8.0.0" + } } diff --git a/packages/eslint-config/.eslintrc.cjs b/packages/eslint-config/.eslintrc.cjs index ab8a8f8..f73db8f 100644 --- a/packages/eslint-config/.eslintrc.cjs +++ b/packages/eslint-config/.eslintrc.cjs @@ -1,8 +1,8 @@ /** @type {import('eslint').ESLint.ConfigData} */ module.exports = { - extends: ['./base.js'], - env: { node: true }, - rules: { - 'unicorn/prefer-module': 'off', - }, + extends: ['./base.js'], + env: { node: true }, + rules: { + 'unicorn/prefer-module': 'off', + }, }; diff --git a/packages/eslint-config/README.md b/packages/eslint-config/README.md index c219bd5..45eb692 100644 --- a/packages/eslint-config/README.md +++ b/packages/eslint-config/README.md @@ -29,8 +29,8 @@ pnpm add -D @mheob/eslint-config ```js // .eslintrc.cjs module.exports = { - root: true, // optional - extends: ['@mheob/eslint-config'], + root: true, // optional + extends: ['@mheob/eslint-config'], }; ``` @@ -39,8 +39,8 @@ module.exports = { ```js // .eslintrc.cjs module.exports = { - root: true, // optional - extends: ['@mheob/eslint-config/react'], + root: true, // optional + extends: ['@mheob/eslint-config/react'], }; ``` @@ -49,8 +49,8 @@ module.exports = { ```js // .eslintrc.cjs module.exports = { - root: true, // optional - extends: ['@mheob/eslint-config/next'], + root: true, // optional + extends: ['@mheob/eslint-config/next'], }; ``` @@ -59,12 +59,12 @@ If you need to override some rules you can do it this way: ```js // .eslintrc.cjs module.exports = { - root: true, // optional - extends: ['@mheob/eslint-config'], - rules: { - 'prettier/prettier': 'off', - 'no-console': 'warn', - }, + root: true, // optional + extends: ['@mheob/eslint-config'], + rules: { + 'prettier/prettier': 'off', + 'no-console': 'warn', + }, }; ``` @@ -73,17 +73,17 @@ Or override rules specified for some files: ```js // .eslintrc.cjs module.exports = { - root: true, // optional - extends: ['@mheob/eslint-config'], - overrides: [ - { - files: ['*.jsx', '*.tsx'], - settings: { react: { version: 'detect' } }, - rules: { - 'react/jsx-no-useless-fragment': 'warn', - 'react/react-in-jsx-scope': 'off', - }, - }, - ], + root: true, // optional + extends: ['@mheob/eslint-config'], + overrides: [ + { + files: ['*.jsx', '*.tsx'], + settings: { react: { version: 'detect' } }, + rules: { + 'react/jsx-no-useless-fragment': 'warn', + 'react/react-in-jsx-scope': 'off', + }, + }, + ], }; ``` diff --git a/packages/eslint-config/base.js b/packages/eslint-config/base.js index c97b0c4..50e25df 100644 --- a/packages/eslint-config/base.js +++ b/packages/eslint-config/base.js @@ -3,50 +3,50 @@ * @type {import('eslint').ESLint.ConfigData} */ module.exports = { - plugins: ['@typescript-eslint'], - extends: ['eslint:recommended', 'plugin:unicorn/recommended', 'plugin:prettier/recommended'], - rules: { - 'prettier/prettier': 'warn', - 'no-console': ['warn', { allow: ['warn', 'error'] }], - 'no-implicit-coercion': ['error', { allow: ['!!', '+', '~'] }], - 'no-unused-vars': ['warn', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }], - 'unicorn/import-index': 'error', - 'unicorn/prevent-abbreviations': [ - 'error', - { - replacements: { - args: false, - doc: false, - env: false, - props: false, - }, - }, - ], - }, - overrides: [ - { - files: ['*.cjs'], - env: { node: true }, - }, - { - files: ['*.js', '*.ts'], - rules: { 'unicorn/filename-case': ['error', { case: 'camelCase' }] }, - }, - { - files: ['*.ts', '*.tsx'], - extends: ['plugin:@typescript-eslint/recommended'], - rules: { - '@typescript-eslint/consistent-type-imports': 'error', - '@typescript-eslint/explicit-function-return-type': [ - 'warn', - { allowExpressions: true, allowTypedFunctionExpressions: true }, - ], - '@typescript-eslint/no-unused-vars': [ - 'warn', - { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }, - ], - '@typescript-eslint/quotes': ['warn', 'single', { avoidEscape: true }], - }, - }, - ], + plugins: ['@typescript-eslint'], + extends: ['eslint:recommended', 'plugin:unicorn/recommended', 'plugin:prettier/recommended'], + rules: { + 'prettier/prettier': 'warn', + 'no-console': ['warn', { allow: ['warn', 'error'] }], + 'no-implicit-coercion': ['error', { allow: ['!!', '+', '~'] }], + 'no-unused-vars': ['warn', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }], + 'unicorn/import-index': 'error', + 'unicorn/prevent-abbreviations': [ + 'error', + { + replacements: { + args: false, + doc: false, + env: false, + props: false, + }, + }, + ], + }, + overrides: [ + { + files: ['*.cjs'], + env: { node: true }, + }, + { + files: ['*.js', '*.ts'], + rules: { 'unicorn/filename-case': ['error', { case: 'camelCase' }] }, + }, + { + files: ['*.ts', '*.tsx'], + extends: ['plugin:@typescript-eslint/recommended'], + rules: { + '@typescript-eslint/consistent-type-imports': 'error', + '@typescript-eslint/explicit-function-return-type': [ + 'warn', + { allowExpressions: true, allowTypedFunctionExpressions: true }, + ], + '@typescript-eslint/no-unused-vars': [ + 'warn', + { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }, + ], + '@typescript-eslint/quotes': ['warn', 'single', { avoidEscape: true }], + }, + }, + ], }; diff --git a/packages/eslint-config/next.js b/packages/eslint-config/next.js index 82f2eb2..2825edd 100644 --- a/packages/eslint-config/next.js +++ b/packages/eslint-config/next.js @@ -3,5 +3,5 @@ * @type {import('eslint').ESLint.ConfigData} */ module.exports = { - extends: ['./react', 'next/core-web-vitals'], + extends: ['./react', 'next/core-web-vitals'], }; diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index 49ecf2b..490faee 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -1,54 +1,54 @@ { - "name": "@mheob/eslint-config", - "version": "2.1.0", - "description": "My personal configuration for eslint.", - "keywords": [ - "eslint", - "config" - ], - "homepage": "https://github.com/mheob/config/tree/main/packages/eslint-config", - "bugs": "https://github.com/mheob/config/issues", - "repository": { - "type": "git", - "url": "https://github.com/mheob/config.git" - }, - "license": "MIT", - "author": "Alexander Böhm ", - "main": "index.js", - "types": "index.d.ts", - "files": [ - "index.js", - "index.d.ts", - "base.js", - "next.js", - "react.js", - "LICENSE", - "README.md" - ], - "scripts": { - "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist", - "lint": "eslint **/*.cjs --fix", - "sort-package-json": "pnpm dlx sort-package-json" - }, - "dependencies": { - "@typescript-eslint/eslint-plugin": "^5.37.0", - "@typescript-eslint/parser": "^5.37.0", - "eslint-config-next": "^12.3.0", - "eslint-config-prettier": "^8.5.0", - "eslint-plugin-prettier": "^4.2.1", - "eslint-plugin-react": "^7.31.8", - "eslint-plugin-unicorn": "^43.0.2" - }, - "devDependencies": { - "eslint": "^8.23.1", - "prettier": "^2.7.1", - "typescript": "^4.8.3" - }, - "peerDependencies": { - "eslint": "^8.23.1", - "prettier": "^2.7.1" - }, - "publishConfig": { - "access": "public" - } + "name": "@mheob/eslint-config", + "version": "2.1.0", + "description": "My personal configuration for eslint.", + "keywords": [ + "eslint", + "config" + ], + "homepage": "https://github.com/mheob/config/tree/main/packages/eslint-config", + "bugs": "https://github.com/mheob/config/issues", + "repository": { + "type": "git", + "url": "https://github.com/mheob/config.git" + }, + "license": "MIT", + "author": "Alexander Böhm ", + "main": "index.js", + "types": "index.d.ts", + "files": [ + "index.js", + "index.d.ts", + "base.js", + "next.js", + "react.js", + "LICENSE", + "README.md" + ], + "scripts": { + "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist", + "lint": "eslint **/*.cjs --fix", + "sort-package-json": "pnpm dlx sort-package-json" + }, + "dependencies": { + "@typescript-eslint/eslint-plugin": "^5.37.0", + "@typescript-eslint/parser": "^5.37.0", + "eslint-config-next": "^12.3.0", + "eslint-config-prettier": "^8.5.0", + "eslint-plugin-prettier": "^4.2.1", + "eslint-plugin-react": "^7.31.8", + "eslint-plugin-unicorn": "^43.0.2" + }, + "devDependencies": { + "eslint": "^8.23.1", + "prettier": "^2.7.1", + "typescript": "^4.8.3" + }, + "peerDependencies": { + "eslint": "^8.23.1", + "prettier": "^2.7.1" + }, + "publishConfig": { + "access": "public" + } } diff --git a/packages/eslint-config/react.js b/packages/eslint-config/react.js index 844c449..489be4a 100644 --- a/packages/eslint-config/react.js +++ b/packages/eslint-config/react.js @@ -3,23 +3,23 @@ * @type {import('eslint').ESLint.ConfigData} */ module.exports = { - extends: ['./base', 'plugin:eslint-plugin-react/recommended'], - settings: { - react: { - version: 'detect', - }, - }, - overrides: [ - { - files: ['*.jsx', '*.tsx'], - settings: { react: { version: 'detect' } }, - rules: { - '@typescript-eslint/explicit-function-return-type': 'off', - 'react/jsx-curly-brace-presence': ['warn', { props: 'never', children: 'never' }], - 'react/jsx-no-useless-fragment': 'warn', - 'react/react-in-jsx-scope': 'off', - 'unicorn/filename-case': ['error', { case: 'pascalCase' }], - }, - }, - ], + extends: ['./base', 'plugin:eslint-plugin-react/recommended'], + settings: { + react: { + version: 'detect', + }, + }, + overrides: [ + { + files: ['*.jsx', '*.tsx'], + settings: { react: { version: 'detect' } }, + rules: { + '@typescript-eslint/explicit-function-return-type': 'off', + 'react/jsx-curly-brace-presence': ['warn', { props: 'never', children: 'never' }], + 'react/jsx-no-useless-fragment': 'warn', + 'react/react-in-jsx-scope': 'off', + 'unicorn/filename-case': ['error', { case: 'pascalCase' }], + }, + }, + ], }; diff --git a/packages/prettier-config/README.md b/packages/prettier-config/README.md index e104d52..51f14ea 100644 --- a/packages/prettier-config/README.md +++ b/packages/prettier-config/README.md @@ -29,9 +29,9 @@ If you need to override some settings you can do it this way: ```js // .prettierrc.cjs module.exports = { - ...require('@mheob/prettier-config'), - semi: false, - importOrder: ['^@company/(.*)$', '^[./]'], + ...require('@mheob/prettier-config'), + semi: false, + importOrder: ['^@company/(.*)$', '^[./]'], }; ``` @@ -46,28 +46,28 @@ const sortImports = require('@trivago/prettier-plugin-sort-imports'); /** @type {import('prettier').Config} */ module.exports = { - plugins: [jsDocPlugin, sortImports], - arrowParens: 'always', - endOfLine: 'lf', - printWidth: 100, - proseWrap: 'always', - importOrder: ['^node:', '', '^[./]'], - importOrderSeparation: true, - importOrderSortSpecifiers: true, - singleQuote: true, - semi: true, - tabWidth: 2, - trailingComma: 'all', - useTabs: false, - - overrides: [ - { - files: '*.{yaml,yml}', - options: { - printWidth: 130, - singleQuote: false, - }, - }, - ], + plugins: [jsDocPlugin, sortImports], + arrowParens: 'always', + endOfLine: 'lf', + printWidth: 100, + proseWrap: 'always', + importOrder: ['^node:', '', '^[./]'], + importOrderSeparation: true, + importOrderSortSpecifiers: true, + singleQuote: true, + semi: true, + tabWidth: 2, + trailingComma: 'all', + useTabs: false, + + overrides: [ + { + files: '*.{yaml,yml}', + options: { + printWidth: 130, + singleQuote: false, + }, + }, + ], }; ``` diff --git a/packages/prettier-config/index.cjs b/packages/prettier-config/index.cjs index f79e8c5..4264e05 100644 --- a/packages/prettier-config/index.cjs +++ b/packages/prettier-config/index.cjs @@ -3,33 +3,32 @@ const sortImports = require('@trivago/prettier-plugin-sort-imports'); /** @type {import('prettier').Config} */ module.exports = { - plugins: [jsDocPlugin, sortImports], - arrowParens: 'always', - endOfLine: 'lf', - printWidth: 100, - proseWrap: 'always', - importOrder: ['^node:', '', '^[./]'], - importOrderSeparation: true, - importOrderSortSpecifiers: true, - singleQuote: true, - semi: true, - tabWidth: 2, - trailingComma: 'all', - useTabs: false, + plugins: [jsDocPlugin, sortImports], + arrowParens: 'always', + endOfLine: 'lf', + printWidth: 100, + proseWrap: 'always', + importOrder: ['^node:', '', '^[./]'], + importOrderSeparation: true, + importOrderSortSpecifiers: true, + singleQuote: true, + semi: true, + trailingComma: 'all', + useTabs: true, - overrides: [ - { - files: '*.{yaml,yml}', - options: { - printWidth: 130, - singleQuote: false, - }, - }, - { - files: '*.md', - options: { - printWidth: 130, - }, - }, - ], + overrides: [ + { + files: '*.{yaml,yml}', + options: { + printWidth: 130, + singleQuote: false, + }, + }, + { + files: '*.md', + options: { + printWidth: 130, + }, + }, + ], }; diff --git a/packages/prettier-config/package.json b/packages/prettier-config/package.json index b5821be..438a95f 100644 --- a/packages/prettier-config/package.json +++ b/packages/prettier-config/package.json @@ -1,45 +1,45 @@ { - "name": "@mheob/prettier-config", - "version": "1.4.0", - "description": "My personal configuration for prettier.", - "keywords": [ - "prettier", - "config" - ], - "homepage": "https://github.com/mheob/config/tree/main/packages/prettier-config", - "bugs": "https://github.com/mheob/config/issues", - "repository": { - "type": "git", - "url": "https://github.com/mheob/config.git" - }, - "license": "MIT", - "author": "Alexander Böhm ", - "main": "index.cjs", - "types": "index.d.ts", - "files": [ - "index.cjs", - "index.d.ts", - "LICENSE", - "README.md" - ], - "scripts": { - "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist", - "lint": "eslint **/*.cjs --fix", - "sort-package-json": "pnpm dlx sort-package-json" - }, - "dependencies": { - "@trivago/prettier-plugin-sort-imports": "^3.3.0", - "prettier-plugin-jsdoc": "^0.4.2" - }, - "devDependencies": { - "@mheob/eslint-config": "workspace:*", - "eslint": "^8.23.1", - "prettier": "^2.7.1" - }, - "peerDependencies": { - "prettier": "^2.7.1" - }, - "publishConfig": { - "access": "public" - } + "name": "@mheob/prettier-config", + "version": "1.4.0", + "description": "My personal configuration for prettier.", + "keywords": [ + "prettier", + "config" + ], + "homepage": "https://github.com/mheob/config/tree/main/packages/prettier-config", + "bugs": "https://github.com/mheob/config/issues", + "repository": { + "type": "git", + "url": "https://github.com/mheob/config.git" + }, + "license": "MIT", + "author": "Alexander Böhm ", + "main": "index.cjs", + "types": "index.d.ts", + "files": [ + "index.cjs", + "index.d.ts", + "LICENSE", + "README.md" + ], + "scripts": { + "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist", + "lint": "eslint **/*.cjs --fix", + "sort-package-json": "pnpm dlx sort-package-json" + }, + "dependencies": { + "@trivago/prettier-plugin-sort-imports": "^3.3.0", + "prettier-plugin-jsdoc": "^0.4.2" + }, + "devDependencies": { + "@mheob/eslint-config": "workspace:*", + "eslint": "^8.23.1", + "prettier": "^2.7.1" + }, + "peerDependencies": { + "prettier": "^2.7.1" + }, + "publishConfig": { + "access": "public" + } } diff --git a/packages/tsconfig/base.json b/packages/tsconfig/base.json index 097cd45..061d2c5 100644 --- a/packages/tsconfig/base.json +++ b/packages/tsconfig/base.json @@ -1,20 +1,20 @@ { - "$schema": "https://json.schemastore.org/tsconfig", - "display": "Default", - "compilerOptions": { - "composite": false, - "declaration": true, - "declarationMap": true, - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "inlineSources": false, - "isolatedModules": true, - "moduleResolution": "Node", - "noUnusedLocals": false, - "noUnusedParameters": false, - "preserveWatchOutput": true, - "skipLibCheck": true, - "strict": true - }, - "exclude": ["node_modules"] + "$schema": "https://json.schemastore.org/tsconfig", + "display": "Default", + "compilerOptions": { + "composite": false, + "declaration": true, + "declarationMap": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "inlineSources": false, + "isolatedModules": true, + "moduleResolution": "Node", + "noUnusedLocals": false, + "noUnusedParameters": false, + "preserveWatchOutput": true, + "skipLibCheck": true, + "strict": true + }, + "exclude": ["node_modules"] } diff --git a/packages/tsconfig/nextjs.json b/packages/tsconfig/nextjs.json index 876f5ae..2d51686 100644 --- a/packages/tsconfig/nextjs.json +++ b/packages/tsconfig/nextjs.json @@ -1,22 +1,22 @@ { - "$schema": "https://json.schemastore.org/tsconfig", - "display": "Next.js", - "extends": "./base.json", - "compilerOptions": { - "target": "ES2017", - "lib": ["DOM", "DOM.Iterable", "ESNext"], - "allowJs": true, - "skipLibCheck": true, - "strict": true, - "forceConsistentCasingInFileNames": true, - "noEmit": true, - "incremental": true, - "esModuleInterop": true, - "module": "ESNext", - "resolveJsonModule": true, - "isolatedModules": true, - "jsx": "preserve" - }, - "include": ["src", "next-env.d.ts"], - "exclude": ["node_modules"] + "$schema": "https://json.schemastore.org/tsconfig", + "display": "Next.js", + "extends": "./base.json", + "compilerOptions": { + "target": "ES2017", + "lib": ["DOM", "DOM.Iterable", "ESNext"], + "allowJs": true, + "skipLibCheck": true, + "strict": true, + "forceConsistentCasingInFileNames": true, + "noEmit": true, + "incremental": true, + "esModuleInterop": true, + "module": "ESNext", + "resolveJsonModule": true, + "isolatedModules": true, + "jsx": "preserve" + }, + "include": ["src", "next-env.d.ts"], + "exclude": ["node_modules"] } diff --git a/packages/tsconfig/package.json b/packages/tsconfig/package.json index d49a4c6..e12d011 100644 --- a/packages/tsconfig/package.json +++ b/packages/tsconfig/package.json @@ -1,11 +1,11 @@ { - "name": "tsconfig", - "version": "0.0.0", - "private": true, - "main": "index.js", - "files": [ - "base.json", - "nextjs.json", - "react-library.json" - ] + "name": "tsconfig", + "version": "0.0.0", + "private": true, + "main": "index.js", + "files": [ + "base.json", + "nextjs.json", + "react-library.json" + ] } diff --git a/packages/tsconfig/react-library.json b/packages/tsconfig/react-library.json index a6461c4..cc33213 100644 --- a/packages/tsconfig/react-library.json +++ b/packages/tsconfig/react-library.json @@ -1,11 +1,11 @@ { - "$schema": "https://json.schemastore.org/tsconfig", - "display": "React Library", - "extends": "./base.json", - "compilerOptions": { - "jsx": "react-jsx", - "lib": ["ES2017"], - "module": "ESNext", - "target": "ES2017" - } + "$schema": "https://json.schemastore.org/tsconfig", + "display": "React Library", + "extends": "./base.json", + "compilerOptions": { + "jsx": "react-jsx", + "lib": ["ES2017"], + "module": "ESNext", + "target": "ES2017" + } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 28315a3..e6265f3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,7 +12,6 @@ importers: '@types/node': ^18.7.18 eslint: ^8.23.1 husky: ^8.0.0 - is-ci: ^3.0.1 lint-staged: ^13.0.3 prettier: ^2.7.1 ts-node: ^10.9.1 @@ -27,7 +26,6 @@ importers: '@types/node': 18.7.18 eslint: 8.23.1 husky: 8.0.1 - is-ci: 3.0.1 lint-staged: 13.0.3 prettier: 2.7.1 ts-node: 10.9.1_bidgzm5cq2du6gnjtweqqjrrn4 diff --git a/scripts/prepare.ts b/scripts/prepare.ts index 10c505b..6982096 100644 --- a/scripts/prepare.ts +++ b/scripts/prepare.ts @@ -3,5 +3,5 @@ import { install as installHusky } from 'husky'; const isCI = process.env.CI !== undefined; if (!isCI) { - installHusky(); + installHusky(); } diff --git a/tsconfig.json b/tsconfig.json index 5e4187e..e542360 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,3 +1,3 @@ { - "extends": "./packages/tsconfig/base.json" + "extends": "./packages/tsconfig/base.json" } diff --git a/turbo.json b/turbo.json index f7092fe..1f1d80d 100644 --- a/turbo.json +++ b/turbo.json @@ -1,14 +1,14 @@ { - "$schema": "https://turborepo.org/schema.json", - "pipeline": { - "clean": { - "outputs": [] - }, - "lint": { - "outputs": [] - }, - "sort-package-json": { - "outputs": [] - } - } + "$schema": "https://turborepo.org/schema.json", + "pipeline": { + "clean": { + "outputs": [] + }, + "lint": { + "outputs": [] + }, + "sort-package-json": { + "outputs": [] + } + } }