@decampsrenan/config 1.0.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] Biome
8
9
  - [ ] ESLint
9
- - [ ] Typescript
10
+ - [x] Typescript
10
11
 
11
12
  ## Install
12
13
 
@@ -18,7 +19,7 @@ npm i -D @decampsrenan/config
18
19
 
19
20
  ### Prettier
20
21
 
21
- ```json
22
+ ```json5
22
23
  // package.json
23
24
  {
24
25
  "name": "...",
@@ -45,4 +46,33 @@ Then run the following commands to check or update files if needed:
45
46
  ```sh
46
47
  npx prettier -c ./ # Check if there is some files to update
47
48
  npx prettier -w ./ # Update files
48
- ```
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
+
70
+ ### TSConfig
71
+
72
+ ```json5
73
+ // tsconfig.json
74
+ {
75
+ "extends": "@decampsrenan/config/tsconfig"
76
+ // Override with your custom needs here
77
+ }
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,10 +1,12 @@
1
1
  {
2
2
  "name": "@decampsrenan/config",
3
- "version": "1.0.0",
3
+ "version": "1.2.0",
4
4
  "description": "Personal config files",
5
5
  "exports": {
6
6
  "./prettier-default": "./prettier-default.mjs",
7
- "./prettier-astro": "./prettier-astro.mjs"
7
+ "./prettier-astro": "./prettier-astro.mjs",
8
+ "./tsconfig": "./tsconfig.json",
9
+ "./biome": "./biome.json"
8
10
  },
9
11
  "scripts": {
10
12
  "test": "true",
@@ -16,7 +18,11 @@
16
18
  "prettier",
17
19
  "prettier-config",
18
20
  "config",
19
- "style"
21
+ "style",
22
+ "typescript",
23
+ "shared",
24
+ "biome",
25
+ "biome-config"
20
26
  ],
21
27
  "author": {
22
28
  "name": "Renan Decamps",
@@ -24,13 +30,16 @@
24
30
  "url": "https://github.com/decampsrenan"
25
31
  },
26
32
  "license": "MIT",
33
+ "publishConfig": {
34
+ "access": "public"
35
+ },
27
36
  "dependencies": {
28
- "@trivago/prettier-plugin-sort-imports": "4.3.0"
37
+ "@trivago/prettier-plugin-sort-imports": "5.2.2"
29
38
  },
30
39
  "devDependencies": {
31
40
  "chokidar-cli": "3.0.0",
32
- "np": "10.1.0",
33
- "prettier": "3.1.1",
41
+ "np": "10.2.0",
42
+ "prettier": "3.6.2",
34
43
  "yalc": "1.0.0-pre.53"
35
44
  },
36
45
  "peerDependencies": {
package/tsconfig.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "compilerOptions": {
4
+ /* Base Options: */
5
+ "esModuleInterop": true,
6
+ "skipLibCheck": true,
7
+ "target": "es2022",
8
+ "allowJs": true,
9
+ "resolveJsonModule": true,
10
+ "moduleDetection": "force",
11
+ "isolatedModules": true,
12
+
13
+ /* Strictness */
14
+ "strict": true,
15
+ "noUncheckedIndexedAccess": true,
16
+
17
+ /* If NOT transpiling with TypeScript: */
18
+ "moduleResolution": "Bundler",
19
+ "module": "ESNext",
20
+ "noEmit": true,
21
+
22
+ /* If your code runs in the DOM: */
23
+ "lib": ["es2022", "dom", "dom.iterable"]
24
+ }
25
+ }