@haltcase/style 6.0.0-canary.1 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,9 +10,9 @@ module.exports = {
10
10
  {
11
11
  files: typescriptFiles,
12
12
  extends: [
13
- "plugin:@typescript-eslint/recommended",
14
- "plugin:@typescript-eslint/recommended-requiring-type-checking",
15
- "plugin:@typescript-eslint/strict",
13
+ "plugin:@typescript-eslint/recommended-type-checked",
14
+ "plugin:@typescript-eslint/strict-type-checked",
15
+ "plugin:@typescript-eslint/stylistic-type-checked",
16
16
  "plugin:import/typescript",
17
17
  "prettier",
18
18
  require.resolve("./rules/typescript"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haltcase/style",
3
- "version": "6.0.0-canary.1",
3
+ "version": "6.0.0",
4
4
  "description": "haltcase's web ecosystem style guide & configurations",
5
5
  "keywords": [
6
6
  "eslint",
package/readme.md CHANGED
@@ -1,4 +1,4 @@
1
- # `@haltcase/style` · [![Version](https://flat.badgen.net/npm/v/@haltcase/style)](https://www.npmjs.com/package/@haltcase/style) [![License](https://flat.badgen.net/npm/license/@haltcase/style)](https://www.npmjs.com/package/@haltcase/style) [![GitHub Actions](https://flat.badgen.net/github/checks/haltcase/style)](https://github.com/haltcase/style/actions)
1
+ # `@haltcase/style` · [![npm version](https://img.shields.io/npm/v/@haltcase/style?style=flat-square)](https://www.npmjs.com/package/@haltcase/style) [![license](https://img.shields.io/npm/l/@haltcase/style?style=flat-square)](https://www.npmjs.com/package/@haltcase/style) [![@haltcase/style](https://img.shields.io/static/v1?label=style&message=haltcase&color=0ca5ed&style=flat-square)](https://haltcase.dev/style)
2
2
 
3
3
  > Style guide and configurations for tools in the web ecosystem.
4
4
 
@@ -23,14 +23,15 @@ pnpm i --save-dev @haltcase/style
23
23
  yarn add --dev @haltcase/style
24
24
  ```
25
25
 
26
- > Some ESLint scenarios require additional peer dependencies.
27
- > See the [ESLint](#eslint) section.
26
+ > [!NOTE]
27
+ > Some scenarios require additional peer dependencies.
28
+ > See the [Prettier](#prettier) and [ESLint](#eslint) sections.
28
29
 
29
30
  ## usage
30
31
 
31
32
  ### Prettier
32
33
 
33
- > **Note**
34
+ > [!NOTE]
34
35
  > Prettier is a peer dependency you'll need to install
35
36
  > at the root of your project.
36
37
  >
@@ -46,7 +47,7 @@ Add the following in `package.json`:
46
47
 
47
48
  ### ESLint
48
49
 
49
- > **Note**
50
+ > [!NOTE]
50
51
  > ESLint is a peer dependency you'll need to install
51
52
  > at the root of your project.
52
53
  >
@@ -59,7 +60,7 @@ Start with at least one of these base configs, which should always be first in `
59
60
  - `@haltcase/style/eslint/browser`
60
61
  - `@haltcase/style/eslint/node`
61
62
 
62
- > **Note**
63
+ > [!TIP]
63
64
  > You can scope configs so they only target specific files.
64
65
  >
65
66
  > See: [Scoped configuration with `overrides`](#scoped-configuration-with-overrides).
@@ -92,15 +93,13 @@ module.exports = {
92
93
  #### Configuring ESLint for TypeScript
93
94
 
94
95
  Some of the rules enabled in the TypeScript config require additional type
95
- information, you'll need to provide the path to your `tsconfig.json`.
96
+ information, so you'll need to use `project: true` and `tsconfigRootDir` or
97
+ explicitly supply the path(s) to your `tsconfig.json` per the typescript-eslint
98
+ documentation.
96
99
 
97
- For more information, see: https://typescript-eslint.io/docs/linting/type-linting
100
+ For more information, see: https://typescript-eslint.io/linting/typed-linting/
98
101
 
99
102
  ```js
100
- const { resolve } = require("path");
101
-
102
- const project = resolve(__dirname, "tsconfig.json");
103
-
104
103
  module.exports = {
105
104
  root: true,
106
105
  extends: [
@@ -108,7 +107,8 @@ module.exports = {
108
107
  require.resolve("@haltcase/style/eslint/typescript")
109
108
  ],
110
109
  parserOptions: {
111
- project
110
+ project: true,
111
+ tsconfigRootDir: __dirname
112
112
  },
113
113
  settings: {
114
114
  "import/resolver": {
@@ -221,7 +221,7 @@ You could also combine them with an `extends` array in [Typescript 5+](https://d
221
221
  }
222
222
  ```
223
223
 
224
- > **Note**
224
+ > [!TIP]
225
225
  > Run `tsc --showConfig` to see the result of the combined configs.
226
226
 
227
227
  ## contributing