From 8e15b0e24a77ee3677b14cada6469f252d38b78a Mon Sep 17 00:00:00 2001 From: Sam Turrell Date: Wed, 18 Oct 2023 11:02:02 +0100 Subject: [PATCH 1/6] Add tests --- .github/workflows/test.yml | 43 ++++++++++++++++ .nvmrc | 1 + packages/eslint-config-basic/package.json | 3 +- packages/eslint-config-nuxt/package.json | 3 +- packages/eslint-config-react/package.json | 3 +- packages/eslint-config-ts/package.json | 3 +- packages/eslint-config-vue/package.json | 3 +- packages/eslint-config/package.json | 3 +- packages/prettier-config/package.json | 3 +- packages/stylelint-config-basic/package.json | 3 +- packages/stylelint-config-scss/package.json | 3 +- packages/stylelint-config-vue/package.json | 3 +- packages/stylelint-config/package.json | 3 +- pnpm-lock.yaml | 54 +++++++++++++++++++- 14 files changed, 119 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/test.yml create mode 100644 .nvmrc diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..919fee7 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,43 @@ +name: Run tests + +on: + - push + - pull_request + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install Node.js + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + + - uses: pnpm/action-setup@v2 + name: Install pnpm + with: + version: 8 + run_install: false + + - name: Get pnpm store directory + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - uses: actions/cache@v3 + name: Setup pnpm cache + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + run: pnpm install + + - name: Run tests + run: pnpm test diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..9a2a0e2 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +v20 diff --git a/packages/eslint-config-basic/package.json b/packages/eslint-config-basic/package.json index 32ad40a..8879e18 100644 --- a/packages/eslint-config-basic/package.json +++ b/packages/eslint-config-basic/package.json @@ -22,7 +22,8 @@ "./dist" ], "scripts": { - "build": "tsup src/index.ts --format esm,cjs --clean --dts" + "build": "tsup src/index.ts --format esm,cjs --clean --dts", + "test": "tsc --noEmit" }, "dependencies": { "eslint-plugin-i": "^2.28.1" diff --git a/packages/eslint-config-nuxt/package.json b/packages/eslint-config-nuxt/package.json index 2d8f38a..5a509d0 100644 --- a/packages/eslint-config-nuxt/package.json +++ b/packages/eslint-config-nuxt/package.json @@ -22,7 +22,8 @@ "./dist" ], "scripts": { - "build": "tsup src/index.ts --format esm,cjs --clean --dts" + "build": "tsup src/index.ts --format esm,cjs --clean --dts", + "test": "tsc --noEmit" }, "devDependencies": { "tsup": "^7.2.0", diff --git a/packages/eslint-config-react/package.json b/packages/eslint-config-react/package.json index 8a7b6b7..78b7791 100644 --- a/packages/eslint-config-react/package.json +++ b/packages/eslint-config-react/package.json @@ -22,7 +22,8 @@ "./dist" ], "scripts": { - "build": "tsup src/index.ts --format esm,cjs --clean --dts" + "build": "tsup src/index.ts --format esm,cjs --clean --dts", + "test": "tsc --noEmit" }, "devDependencies": { "tsup": "^7.2.0", diff --git a/packages/eslint-config-ts/package.json b/packages/eslint-config-ts/package.json index e961773..d93d72c 100644 --- a/packages/eslint-config-ts/package.json +++ b/packages/eslint-config-ts/package.json @@ -22,7 +22,8 @@ "./dist" ], "scripts": { - "build": "tsup src/index.ts --format esm,cjs --clean --dts" + "build": "tsup src/index.ts --format esm,cjs --clean --dts", + "test": "tsc --noEmit" }, "devDependencies": { "tsup": "^7.2.0", diff --git a/packages/eslint-config-vue/package.json b/packages/eslint-config-vue/package.json index c790d89..9026ca9 100644 --- a/packages/eslint-config-vue/package.json +++ b/packages/eslint-config-vue/package.json @@ -22,7 +22,8 @@ "./dist" ], "scripts": { - "build": "tsup src/index.ts --format esm,cjs --clean --dts" + "build": "tsup src/index.ts --format esm,cjs --clean --dts", + "test": "tsc --noEmit" }, "dependencies": { "eslint-plugin-vue": "^9.17.0", diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index dc73175..5e2d889 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -22,7 +22,8 @@ "./dist" ], "scripts": { - "build": "tsup src/index.ts --format esm,cjs --clean --dts" + "build": "tsup src/index.ts --format esm,cjs --clean --dts", + "test": "tsc --noEmit" }, "dependencies": { "@hedgehoglab/eslint-config-basic": "workspace:*", diff --git a/packages/prettier-config/package.json b/packages/prettier-config/package.json index acf787d..fa18840 100644 --- a/packages/prettier-config/package.json +++ b/packages/prettier-config/package.json @@ -19,7 +19,8 @@ "./dist" ], "scripts": { - "build": "tsup src/index.ts --format esm,cjs --clean --dts" + "build": "tsup src/index.ts --format esm,cjs --clean --dts", + "test": "tsc --noEmit" }, "devDependencies": { "tsup": "^7.2.0", diff --git a/packages/stylelint-config-basic/package.json b/packages/stylelint-config-basic/package.json index 5716c3e..f8778bd 100644 --- a/packages/stylelint-config-basic/package.json +++ b/packages/stylelint-config-basic/package.json @@ -19,7 +19,8 @@ "./dist" ], "scripts": { - "build": "tsup src/index.ts --format esm,cjs --clean --dts && fix-tsup-cjs" + "build": "tsup src/index.ts --format esm,cjs --clean --dts && fix-tsup-cjs", + "test": "tsc --noEmit" }, "devDependencies": { "fix-tsup-cjs": "^1.2.0", diff --git a/packages/stylelint-config-scss/package.json b/packages/stylelint-config-scss/package.json index 1040157..440abbc 100644 --- a/packages/stylelint-config-scss/package.json +++ b/packages/stylelint-config-scss/package.json @@ -19,7 +19,8 @@ "./dist" ], "scripts": { - "build": "tsup src/index.ts --format esm,cjs --clean --dts && fix-tsup-cjs" + "build": "tsup src/index.ts --format esm,cjs --clean --dts && fix-tsup-cjs", + "test": "tsc --noEmit" }, "dependencies": { "stylelint": "^15.10.3", diff --git a/packages/stylelint-config-vue/package.json b/packages/stylelint-config-vue/package.json index 3616327..a7e89c0 100644 --- a/packages/stylelint-config-vue/package.json +++ b/packages/stylelint-config-vue/package.json @@ -19,7 +19,8 @@ "./dist" ], "scripts": { - "build": "tsup src/index.ts --format esm,cjs --clean --dts && fix-tsup-cjs" + "build": "tsup src/index.ts --format esm,cjs --clean --dts && fix-tsup-cjs", + "test": "tsc --noEmit" }, "dependencies": { "stylelint-config-html": "^1.1.0", diff --git a/packages/stylelint-config/package.json b/packages/stylelint-config/package.json index 85ed5b3..d5ed954 100644 --- a/packages/stylelint-config/package.json +++ b/packages/stylelint-config/package.json @@ -19,7 +19,8 @@ "./dist" ], "scripts": { - "build": "tsup src/index.ts --format esm,cjs --clean --dts && fix-tsup-cjs" + "build": "tsup src/index.ts --format esm,cjs --clean --dts && fix-tsup-cjs", + "test": "tsc --noEmit" }, "dependencies": { "@hedgehoglab/stylelint-config-basic": "workspace:*", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4557a59..5dde3d4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -53,7 +53,7 @@ importers: devDependencies: tsup: specifier: ^7.2.0 - version: 7.2.0(postcss@8.4.31)(typescript@5.2.2) + version: 7.2.0(typescript@5.2.2) typescript: specifier: ^5.2.2 version: 5.2.2 @@ -2005,6 +2005,22 @@ packages: postcss-safe-parser: 6.0.0(postcss@8.4.31) dev: false + /postcss-load-config@4.0.1: + resolution: {integrity: sha512-vEJIc8RdiBRu3oRAI0ymerOn+7rPuMvRXslTvZUKZonDHFIczxztIyJ1urxM1x9JXEikvpWWTUUqal5j/8QgvA==} + engines: {node: '>= 14'} + peerDependencies: + postcss: '>=8.0.9' + ts-node: '>=9.0.0' + peerDependenciesMeta: + postcss: + optional: true + ts-node: + optional: true + dependencies: + lilconfig: 2.1.0 + yaml: 2.3.2 + dev: true + /postcss-load-config@4.0.1(postcss@8.4.31): resolution: {integrity: sha512-vEJIc8RdiBRu3oRAI0ymerOn+7rPuMvRXslTvZUKZonDHFIczxztIyJ1urxM1x9JXEikvpWWTUUqal5j/8QgvA==} engines: {node: '>= 14'} @@ -2572,6 +2588,42 @@ packages: - ts-node dev: true + /tsup@7.2.0(typescript@5.2.2): + resolution: {integrity: sha512-vDHlczXbgUvY3rWvqFEbSqmC1L7woozbzngMqTtL2PGBODTtWlRwGDDawhvWzr5c1QjKe4OAKqJGfE1xeXUvtQ==} + engines: {node: '>=16.14'} + hasBin: true + peerDependencies: + '@swc/core': ^1 + postcss: ^8.4.12 + typescript: '>=4.1.0' + peerDependenciesMeta: + '@swc/core': + optional: true + postcss: + optional: true + typescript: + optional: true + dependencies: + bundle-require: 4.0.2(esbuild@0.18.20) + cac: 6.7.14 + chokidar: 3.5.3 + debug: 4.3.4 + esbuild: 0.18.20 + execa: 5.1.1 + globby: 11.1.0 + joycon: 3.1.1 + postcss-load-config: 4.0.1 + resolve-from: 5.0.0 + rollup: 3.29.4 + source-map: 0.8.0-beta.0 + sucrase: 3.34.0 + tree-kill: 1.2.2 + typescript: 5.2.2 + transitivePeerDependencies: + - supports-color + - ts-node + dev: true + /type-check@0.4.0: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} From ddfb027ac24c7e0162c0d609050b25de193a4e97 Mon Sep 17 00:00:00 2001 From: Sam Turrell Date: Wed, 18 Oct 2023 11:03:18 +0100 Subject: [PATCH 2/6] Recursive --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 919fee7..5674104 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,7 +37,7 @@ jobs: ${{ runner.os }}-pnpm-store- - name: Install dependencies - run: pnpm install + run: pnpm -r install - name: Run tests run: pnpm test From c39448be67fd97a729ffaad2455b67e74da6f630 Mon Sep 17 00:00:00 2001 From: Sam Turrell Date: Wed, 18 Oct 2023 11:05:56 +0100 Subject: [PATCH 3/6] test --- .github/workflows/test.yml | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5674104..78d46f3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,23 +21,6 @@ jobs: name: Install pnpm with: version: 8 - run_install: false - - - name: Get pnpm store directory - shell: bash - run: | - echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - - - uses: actions/cache@v3 - name: Setup pnpm cache - with: - path: ${{ env.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- - - - name: Install dependencies - run: pnpm -r install - name: Run tests run: pnpm test From ce4a34c441c8e833897cb7aee72d59ee6dc8121e Mon Sep 17 00:00:00 2001 From: Sam Turrell Date: Wed, 18 Oct 2023 11:07:17 +0100 Subject: [PATCH 4/6] Recursive --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 78d46f3..08b5ade 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,6 +21,8 @@ jobs: name: Install pnpm with: version: 8 + run_install: | + - recursive: true - name: Run tests run: pnpm test From f6cbb5f3de642b7c39776aeb1f0e4d03b4b3a5e7 Mon Sep 17 00:00:00 2001 From: Sam Turrell Date: Wed, 18 Oct 2023 11:08:48 +0100 Subject: [PATCH 5/6] Build --- .github/workflows/test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 08b5ade..0ca8173 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,5 +24,8 @@ jobs: run_install: | - recursive: true + - name: Build + run: pnpm build + - name: Run tests run: pnpm test From 115503badc5069520e60bd1f2ef7ea9b740d39cb Mon Sep 17 00:00:00 2001 From: Sam Turrell Date: Wed, 18 Oct 2023 14:11:07 +0100 Subject: [PATCH 6/6] Updated package readmes --- README.md | 6 ++++ packages/eslint-config-basic/README.md | 5 +++- packages/eslint-config-basic/package.json | 1 + packages/eslint-config-nuxt/README.md | 3 ++ packages/eslint-config-nuxt/package.json | 6 ++-- packages/eslint-config-react/README.md | 3 ++ packages/eslint-config-react/package.json | 6 ++-- packages/eslint-config-ts/README.md | 3 ++ packages/eslint-config-ts/package.json | 6 ++-- packages/eslint-config-vue/README.md | 3 ++ packages/eslint-config-vue/package.json | 6 ++-- packages/eslint-config/README.md | 3 ++ packages/eslint-config/package.json | 3 +- packages/prettier-config/package.json | 8 ++++-- packages/stylelint-config-basic/README.md | 3 ++ packages/stylelint-config-basic/package.json | 8 ++++-- packages/stylelint-config-scss/README.md | 3 ++ packages/stylelint-config-scss/package.json | 9 ++++-- packages/stylelint-config-vue/README.md | 3 ++ packages/stylelint-config-vue/package.json | 9 ++++-- packages/stylelint-config/README.md | 3 ++ packages/stylelint-config/package.json | 8 ++++-- scripts/make-package/stubs/README.md | 29 ++++++++++++++++++++ scripts/make-package/stubs/package.json | 15 ++++++---- 24 files changed, 126 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 2fd7e3d..597b7d8 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,9 @@ Monorepo for managing all the linter configs used on projects within the hedgeho ### Eslint +> [!NOTE] +> The `@hedgehoglab/eslint-config` package pulls in all of the framework specific configs, so you should only need to pull in the specific config packages if there are incompatibilities. + - [@hedgehoglab/eslint-config](./packages/eslint-config) - [@hedgehoglab/eslint-config-basic](./packages/eslint-config-basic) - [@hedgehoglab/eslint-config-ts](./packages/eslint-config-ts) @@ -20,6 +23,9 @@ Monorepo for managing all the linter configs used on projects within the hedgeho ### Stylelint +> [!NOTE] +> The `@hedgehoglab/stylelint-config` package pulls in all of the framework/pre-processor specific configs, so you should only need to pull in the specific config packages if there are incompatibilities. + - [@hedgehoglab/stylelint-config](./packages/stylelint-config) - [@hedgehoglab/stylelint-config-basic](./packages/stylelint-config-basic) - [@hedgehoglab/stylelint-config-scss](./packages/stylelint-config-scss) diff --git a/packages/eslint-config-basic/README.md b/packages/eslint-config-basic/README.md index 7d028ba..b75e511 100644 --- a/packages/eslint-config-basic/README.md +++ b/packages/eslint-config-basic/README.md @@ -2,10 +2,13 @@ # @hedgehoglab/eslint-config-basic -This package contains the standard ESlint configuration used on all hedgehog lab projects, both internally and for our clients. +This package contains the standard ESlint configuration used on all hedgehog lab projects, both internally and for our clients. It contains This package is meant to be used with eslint configs using the new [ESlint flat config](https://eslint.org/docs/latest/use/configure/migration-guide#start-using-flat-config-files) format. +> [!NOTE] +> This package contains basic rules, and nothing framework specific. Please pull in the framework specific configs alongside this one as needed. + ## Usage Add the config to your project dependencies: diff --git a/packages/eslint-config-basic/package.json b/packages/eslint-config-basic/package.json index 8879e18..5997c27 100644 --- a/packages/eslint-config-basic/package.json +++ b/packages/eslint-config-basic/package.json @@ -4,6 +4,7 @@ "description": "Basic eslint config rules for the hedgehog lab org", "keywords": [ "eslint-config", + "eslint", "hedgehoglab" ], "homepage": "https://github.com/hedgehoglab-engineering/frontend-linters/tree/main/packages/eslint-config-basic", diff --git a/packages/eslint-config-nuxt/README.md b/packages/eslint-config-nuxt/README.md index 791275a..54de077 100644 --- a/packages/eslint-config-nuxt/README.md +++ b/packages/eslint-config-nuxt/README.md @@ -6,6 +6,9 @@ This package contains the standard ESlint configuration used on all hedgehog lab This package is meant to be used with eslint configs using the new [ESlint flat config](https://eslint.org/docs/latest/use/configure/migration-guide#start-using-flat-config-files) format. +> [!NOTE] +> This package contains Nuxt-specific rules, and not the basic rules. Please pull in the basic config alongside this one as needed. + ## Usage Add the config to your project dependencies: diff --git a/packages/eslint-config-nuxt/package.json b/packages/eslint-config-nuxt/package.json index 5a509d0..e834091 100644 --- a/packages/eslint-config-nuxt/package.json +++ b/packages/eslint-config-nuxt/package.json @@ -1,10 +1,12 @@ { "name": "@hedgehoglab/eslint-config-nuxt", "version": "0.1.7", - "description": "Basic eslint config rules for the hedgehog lab org", + "description": "Nuxt eslint config rules for the hedgehog lab org", "keywords": [ "eslint-config", - "hedgehoglab" + "eslint", + "hedgehoglab", + "nuxt" ], "homepage": "https://github.com/hedgehoglab-engineering/frontend-linters/tree/main/packages/eslint-config-nuxt", "license": "ISC", diff --git a/packages/eslint-config-react/README.md b/packages/eslint-config-react/README.md index d8907ec..4f30ed0 100644 --- a/packages/eslint-config-react/README.md +++ b/packages/eslint-config-react/README.md @@ -6,6 +6,9 @@ This package contains the standard ESlint configuration used on all hedgehog lab This package is meant to be used with eslint configs using the new [ESlint flat config](https://eslint.org/docs/latest/use/configure/migration-guide#start-using-flat-config-files) format. +> [!NOTE] +> This package contains React-specific rules, and not the basic rules. Please pull in the basic config alongside this one as needed. + ## Usage Add the config to your project dependencies: diff --git a/packages/eslint-config-react/package.json b/packages/eslint-config-react/package.json index 78b7791..78b5e22 100644 --- a/packages/eslint-config-react/package.json +++ b/packages/eslint-config-react/package.json @@ -1,10 +1,12 @@ { "name": "@hedgehoglab/eslint-config-react", "version": "0.1.7", - "description": "Basic eslint config rules for the hedgehog lab org", + "description": "React eslint config rules for the hedgehog lab org", "keywords": [ "eslint-config", - "hedgehoglab" + "eslint", + "hedgehoglab", + "react" ], "homepage": "https://github.com/hedgehoglab-engineering/frontend-linters/tree/main/packages/eslint-config-react", "license": "ISC", diff --git a/packages/eslint-config-ts/README.md b/packages/eslint-config-ts/README.md index 48a6be1..ddd999b 100644 --- a/packages/eslint-config-ts/README.md +++ b/packages/eslint-config-ts/README.md @@ -6,6 +6,9 @@ This package contains the standard ESlint configuration used on all hedgehog lab This package is meant to be used with eslint configs using the new [ESlint flat config](https://eslint.org/docs/latest/use/configure/migration-guide#start-using-flat-config-files) format. +> [!NOTE] +> This package contains TypeScript-specific rules, and not the basic rules. Please pull in the basic config alongside this one as needed. + ## Usage Add the config to your project dependencies: diff --git a/packages/eslint-config-ts/package.json b/packages/eslint-config-ts/package.json index d93d72c..3a33d0e 100644 --- a/packages/eslint-config-ts/package.json +++ b/packages/eslint-config-ts/package.json @@ -1,10 +1,12 @@ { "name": "@hedgehoglab/eslint-config-ts", "version": "0.1.7", - "description": "Basic eslint config rules for the hedgehog lab org", + "description": "Typescript eslint config rules for the hedgehog lab org", "keywords": [ "eslint-config", - "hedgehoglab" + "eslint", + "hedgehoglab", + "typescript" ], "homepage": "https://github.com/hedgehoglab-engineering/frontend-linters/tree/main/packages/eslint-config-ts", "license": "ISC", diff --git a/packages/eslint-config-vue/README.md b/packages/eslint-config-vue/README.md index b32cf88..7a019f4 100644 --- a/packages/eslint-config-vue/README.md +++ b/packages/eslint-config-vue/README.md @@ -6,6 +6,9 @@ This package contains the standard ESlint configuration used on all hedgehog lab This package is meant to be used with eslint configs using the new [ESlint flat config](https://eslint.org/docs/latest/use/configure/migration-guide#start-using-flat-config-files) format. +> [!NOTE] +> This package contains Vue-specific rules, and not the basic rules. Please pull in the basic config alongside this one as needed. + ## Usage Add the config to your project dependencies: diff --git a/packages/eslint-config-vue/package.json b/packages/eslint-config-vue/package.json index 9026ca9..d5a57f3 100644 --- a/packages/eslint-config-vue/package.json +++ b/packages/eslint-config-vue/package.json @@ -1,10 +1,12 @@ { "name": "@hedgehoglab/eslint-config-vue", "version": "0.1.7", - "description": "Basic eslint config rules for the hedgehog lab org", + "description": "Vue eslint config rules for the hedgehog lab org", "keywords": [ "eslint-config", - "hedgehoglab" + "eslint", + "hedgehoglab", + "vue" ], "homepage": "https://github.com/hedgehoglab-engineering/frontend-linters/tree/main/packages/eslint-config-vue", "license": "ISC", diff --git a/packages/eslint-config/README.md b/packages/eslint-config/README.md index a2d1c98..2b95bd3 100644 --- a/packages/eslint-config/README.md +++ b/packages/eslint-config/README.md @@ -6,6 +6,9 @@ This package contains the standard ESlint configuration used on all hedgehog lab This package is meant to be used with eslint configs using the new [ESlint flat config](https://eslint.org/docs/latest/use/configure/migration-guide#start-using-flat-config-files) format. +> [!NOTE] +> This package contains all the configs of the org, including all framework specific configs. Framework specific configs do not need to be pulled in alongside this one. + ## Usage Add the config to your project dependencies: diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index 5e2d889..edfc5a4 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -1,9 +1,10 @@ { "name": "@hedgehoglab/eslint-config", "version": "0.1.7", - "description": "Basic eslint config rules for the hedgehog lab org", + "description": "Combined eslint config rules for the hedgehog lab org", "keywords": [ "eslint-config", + "eslint", "hedgehoglab" ], "homepage": "https://github.com/hedgehoglab-engineering/frontend-linters/tree/main/packages/eslint-config", diff --git a/packages/prettier-config/package.json b/packages/prettier-config/package.json index fa18840..c239fff 100644 --- a/packages/prettier-config/package.json +++ b/packages/prettier-config/package.json @@ -1,8 +1,12 @@ { "name": "@hedgehoglab/prettier-config", "version": "0.1.7", - "description": "", - "keywords": [], + "description": "Prettier config rules for the hedgehog lab org", + "keywords": [ + "prettier-config", + "prettier", + "hedgehoglab" + ], "homepage": "https://github.com/hedgehoglab-engineering/frontend-linters/tree/main/packages/prettier-config", "license": "ISC", "author": "Sam Turrell ", diff --git a/packages/stylelint-config-basic/README.md b/packages/stylelint-config-basic/README.md index 9a3499b..0a9a7a4 100644 --- a/packages/stylelint-config-basic/README.md +++ b/packages/stylelint-config-basic/README.md @@ -4,6 +4,9 @@ This package contains the standard Stylelint configuration used on all hedgehog lab projects, both internally and for our clients. +> [!NOTE] +> This package contains basic rules, and nothing pre-processor specific. Please pull in the pre-processor specific configs alongside this one as needed. + ## Usage Add the config to your project dependencies: diff --git a/packages/stylelint-config-basic/package.json b/packages/stylelint-config-basic/package.json index f8778bd..803b75a 100644 --- a/packages/stylelint-config-basic/package.json +++ b/packages/stylelint-config-basic/package.json @@ -1,8 +1,12 @@ { "name": "@hedgehoglab/stylelint-config-basic", "version": "0.1.7", - "description": "", - "keywords": [], + "description": "Basic stylelint config rules for the hedgehog lab org", + "keywords": [ + "stylelint-config", + "stylelint", + "hedgehoglab" + ], "homepage": "https://github.com/hedgehoglab-engineering/frontend-linters/tree/main/packages/stylelint-config-basic", "license": "ISC", "author": "Sam Turrell ", diff --git a/packages/stylelint-config-scss/README.md b/packages/stylelint-config-scss/README.md index 9ecc773..aea53f2 100644 --- a/packages/stylelint-config-scss/README.md +++ b/packages/stylelint-config-scss/README.md @@ -4,6 +4,9 @@ This package contains the standard Stylelint configuration used on all hedgehog lab projects, both internally and for our clients. +> [!NOTE] +> This package contains SCSS-specific rules, and not the basic rules. Please pull in the basic config alongside this one as needed. + ## Usage Add the config to your project dependencies: diff --git a/packages/stylelint-config-scss/package.json b/packages/stylelint-config-scss/package.json index 440abbc..6a63913 100644 --- a/packages/stylelint-config-scss/package.json +++ b/packages/stylelint-config-scss/package.json @@ -1,8 +1,13 @@ { "name": "@hedgehoglab/stylelint-config-scss", "version": "0.1.7", - "description": "", - "keywords": [], + "description": "SCSS specific stylelint config rules for the hedgehog lab org", + "keywords": [ + "stylelint-config", + "stylelint", + "hedgehoglab", + "scss" + ], "homepage": "https://github.com/hedgehoglab-engineering/frontend-linters/tree/main/packages/stylelint-config-scss", "license": "ISC", "author": "Sam Turrell ", diff --git a/packages/stylelint-config-vue/README.md b/packages/stylelint-config-vue/README.md index 8fee9e5..255cbec 100644 --- a/packages/stylelint-config-vue/README.md +++ b/packages/stylelint-config-vue/README.md @@ -4,6 +4,9 @@ This package contains the standard Stylelint configuration used on all hedgehog lab projects, both internally and for our clients. +> [!NOTE] +> This package contains Vue-specific rules, and not the basic rules. Please pull in the basic config alongside this one as needed. + ## Usage Add the config to your project dependencies: diff --git a/packages/stylelint-config-vue/package.json b/packages/stylelint-config-vue/package.json index a7e89c0..1c3003c 100644 --- a/packages/stylelint-config-vue/package.json +++ b/packages/stylelint-config-vue/package.json @@ -1,8 +1,13 @@ { "name": "@hedgehoglab/stylelint-config-vue", "version": "0.1.7", - "description": "", - "keywords": [], + "description": "Vue specific stylelint config rules for the hedgehog lab org", + "keywords": [ + "stylelint-config", + "stylelint", + "hedgehoglab", + "vue" + ], "homepage": "https://github.com/hedgehoglab-engineering/frontend-linters/tree/main/packages/stylelint-config-vue", "license": "ISC", "author": "Sam Turrell ", diff --git a/packages/stylelint-config/README.md b/packages/stylelint-config/README.md index 93eedae..a08e1a4 100644 --- a/packages/stylelint-config/README.md +++ b/packages/stylelint-config/README.md @@ -4,6 +4,9 @@ This package contains the standard Stylelint configuration used on all hedgehog lab projects, both internally and for our clients. +> [!NOTE] +> This package contains all the configs of the org, including all pre-processor specific configs. Pre-processor specific configs do not need to be pulled in alongside this one. + ## Usage Add the config to your project dependencies: diff --git a/packages/stylelint-config/package.json b/packages/stylelint-config/package.json index d5ed954..1550d49 100644 --- a/packages/stylelint-config/package.json +++ b/packages/stylelint-config/package.json @@ -1,8 +1,12 @@ { "name": "@hedgehoglab/stylelint-config", "version": "0.1.7", - "description": "", - "keywords": [], + "description": "Combined stylelint config rules for the hedgehog lab org", + "keywords": [ + "stylelint-config", + "stylelint", + "hedgehoglab" + ], "homepage": "https://github.com/hedgehoglab-engineering/frontend-linters/tree/main/packages/stylelint-config", "license": "ISC", "author": "Sam Turrell ", diff --git a/scripts/make-package/stubs/README.md b/scripts/make-package/stubs/README.md index e69de29..456b746 100644 --- a/scripts/make-package/stubs/README.md +++ b/scripts/make-package/stubs/README.md @@ -0,0 +1,29 @@ +![hedgehog lab logo](https://github.com/hedgehoglab-engineering/frontend-linters/raw/main/assets/images/hhl-logo-dark.png) + +# @hedgehoglab/{{PACKAGE_NAME}} + +This is a description of this package, and should be updated. + +## Usage + +Add the config to your project dependencies: + +```bash +yarn add -D @hedgehoglab/{{PACKAGE_NAME}} + +or + +pnpm add -D @hedgehoglab/{{PACKAGE_NAME}} + +or + +npm install -D @hedgehoglab/{{PACKAGE_NAME}} +``` + +## Contributing + +If you disagree with any rules in this linter, or feel additional rules should be added, please open an issue on this project to initiate an open dialogue with all team members. + +Please bear in mind this is a public repository, and all contributions follow the project [Code of Conduct](../../CODE_OF_CONDUCT.md). + +For instructions on how to contribute code to this project, please see the [CONTRIBUTING.md](../../CONTRIBUTING.md). diff --git a/scripts/make-package/stubs/package.json b/scripts/make-package/stubs/package.json index a1ab223..1030420 100644 --- a/scripts/make-package/stubs/package.json +++ b/scripts/make-package/stubs/package.json @@ -1,12 +1,14 @@ { - "name": "", - "version": "", - "description": "", - "keywords": [], + "name": "Will autogenerate", + "version": "Will autogenerate", + "description": "Will autogenerate", + "keywords": [ + "hedgehoglab" + ], + "homepage": "Will autogenerate", "license": "ISC", "author": "Sam Turrell ", "type": "module", - "homepage": "", "exports": { ".": { "import": "./dist/index.js", @@ -19,7 +21,8 @@ "./dist" ], "scripts": { - "build": "tsup src/index.ts --format esm,cjs --clean --dts && fix-tsup-cjs" + "build": "tsup src/index.ts --format esm,cjs --clean --dts && fix-tsup-cjs", + "test": "tsc --noEmit" }, "devDependencies": { "fix-tsup-cjs": "^1.2.0",