@decampsrenan/config 1.1.0 → 1.2.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.
@@ -0,0 +1,7 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(git checkout:*)"
5
+ ]
6
+ }
7
+ }
package/README.md CHANGED
@@ -5,8 +5,9 @@ I use this config in all my projects. No need to copy/paste anymore 😄
5
5
  ## Supported tools
6
6
 
7
7
  - [x] Prettier
8
- - [x] ESLint
9
- - [ ] Typescript
8
+ - [x] Biome
9
+ - [ ] ESLint
10
+ - [x] Typescript
10
11
 
11
12
  ## Install
12
13
 
@@ -47,6 +48,25 @@ npx prettier -c ./ # Check if there is some files to update
47
48
  npx prettier -w ./ # Update files
48
49
  ```
49
50
 
51
+ ### Biome
52
+
53
+ Biome requires a `biome.json` file (no `package.json` support):
54
+
55
+ ```json5
56
+ // biome.json
57
+ {
58
+ "$schema": "https://biomejs.dev/schemas/2.4.7/schema.json",
59
+ "extends": ["@decampsrenan/config/biome"]
60
+ }
61
+ ```
62
+
63
+ Then run:
64
+
65
+ ```sh
66
+ npx @biomejs/biome check ./ # Check formatting and linting
67
+ npx @biomejs/biome check --write ./ # Auto-fix
68
+ ```
69
+
50
70
  ### TSConfig
51
71
 
52
72
  ```json5
@@ -55,4 +75,4 @@ npx prettier -w ./ # Update files
55
75
  "extends": "@decampsrenan/config/tsconfig"
56
76
  // Override with your custom needs here
57
77
  }
58
- ```
78
+ ```
package/biome.json ADDED
@@ -0,0 +1,75 @@
1
+ {
2
+ "$schema": "https://biomejs.dev/schemas/2.4.7/schema.json",
3
+ "vcs": {
4
+ "enabled": true,
5
+ "clientKind": "git",
6
+ "useIgnoreFile": true
7
+ },
8
+ "assist": {
9
+ "actions": {
10
+ "source": {
11
+ "organizeImports": {
12
+ "level": "on",
13
+ "options": {
14
+ "groups": [
15
+ ["react", "react-dom", "react-dom/**", "react-*", "react-*/**"],
16
+ ":BLANK_LINE:",
17
+ ":PACKAGE:",
18
+ ":BLANK_LINE:",
19
+ ":ALIAS:",
20
+ ":BLANK_LINE:",
21
+ ":PACKAGE_WITH_PROTOCOL:",
22
+ ":BLANK_LINE:",
23
+ ":PATH:"
24
+ ]
25
+ }
26
+ }
27
+ }
28
+ }
29
+ },
30
+ "formatter": {
31
+ "enabled": true,
32
+ "formatWithErrors": false,
33
+ "indentStyle": "space",
34
+ "indentWidth": 2,
35
+ "lineWidth": 100,
36
+ "lineEnding": "lf",
37
+ "attributePosition": "auto"
38
+ },
39
+ "javascript": {
40
+ "formatter": {
41
+ "semicolons": "always",
42
+ "quoteStyle": "single",
43
+ "jsxQuoteStyle": "double",
44
+ "quoteProperties": "asNeeded",
45
+ "trailingCommas": "all",
46
+ "bracketSpacing": true,
47
+ "bracketSameLine": true,
48
+ "arrowParentheses": "always",
49
+ "attributePosition": "auto"
50
+ }
51
+ },
52
+ "linter": {
53
+ "enabled": true,
54
+ "rules": {
55
+ "recommended": true,
56
+ "correctness": {
57
+ "noUnusedImports": "error",
58
+ "noUnusedVariables": "error",
59
+ "useExhaustiveDependencies": "warn",
60
+ "useHookAtTopLevel": "error"
61
+ },
62
+ "style": {
63
+ "noNonNullAssertion": "warn",
64
+ "useBlockStatements": "error",
65
+ "useConst": "error",
66
+ "useImportType": "error",
67
+ "useNodejsImportProtocol": "error"
68
+ },
69
+ "suspicious": {
70
+ "noExplicitAny": "error",
71
+ "noConsoleLog": "warn"
72
+ }
73
+ }
74
+ }
75
+ }
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@decampsrenan/config",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "Personal config files",
5
5
  "exports": {
6
6
  "./prettier-default": "./prettier-default.mjs",
7
7
  "./prettier-astro": "./prettier-astro.mjs",
8
- "./tsconfig": "./tsconfig.json"
8
+ "./tsconfig": "./tsconfig.json",
9
+ "./biome": "./biome.json"
9
10
  },
10
11
  "scripts": {
11
12
  "test": "true",
@@ -17,7 +18,11 @@
17
18
  "prettier",
18
19
  "prettier-config",
19
20
  "config",
20
- "style"
21
+ "style",
22
+ "typescript",
23
+ "shared",
24
+ "biome",
25
+ "biome-config"
21
26
  ],
22
27
  "author": {
23
28
  "name": "Renan Decamps",
@@ -25,13 +30,16 @@
25
30
  "url": "https://github.com/decampsrenan"
26
31
  },
27
32
  "license": "MIT",
33
+ "publishConfig": {
34
+ "access": "public"
35
+ },
28
36
  "dependencies": {
29
- "@trivago/prettier-plugin-sort-imports": "4.3.0"
37
+ "@trivago/prettier-plugin-sort-imports": "5.2.2"
30
38
  },
31
39
  "devDependencies": {
32
40
  "chokidar-cli": "3.0.0",
33
- "np": "10.1.0",
34
- "prettier": "3.1.1",
41
+ "np": "10.2.0",
42
+ "prettier": "3.6.2",
35
43
  "yalc": "1.0.0-pre.53"
36
44
  },
37
45
  "peerDependencies": {
package/tsconfig.json CHANGED
@@ -9,17 +9,17 @@
9
9
  "resolveJsonModule": true,
10
10
  "moduleDetection": "force",
11
11
  "isolatedModules": true,
12
-
12
+
13
13
  /* Strictness */
14
14
  "strict": true,
15
15
  "noUncheckedIndexedAccess": true,
16
-
16
+
17
17
  /* If NOT transpiling with TypeScript: */
18
18
  "moduleResolution": "Bundler",
19
19
  "module": "ESNext",
20
20
  "noEmit": true,
21
-
21
+
22
22
  /* If your code runs in the DOM: */
23
- "lib": ["es2022", "dom", "dom.iterable"],
23
+ "lib": ["es2022", "dom", "dom.iterable"]
24
24
  }
25
- }
25
+ }