@nedcloarbr/biome-config 1.3.0 → 1.4.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.
package/README.md CHANGED
@@ -22,7 +22,11 @@
22
22
 
23
23
  Configuring a linter and formatter, such as `BiomeJS`, is crucial for maintaining consistent, readable, and error-free code. Linters ensure uniform coding standards and early error detection, saving debugging time. Formatters automate code structuring, enhancing readability and maintenance. These tools increase productivity by allowing developers to focus on critical tasks. They also enforce quality standards, creating a professional development environment. In CI/CD workflows, they ensure code adherence to quality standards, preserving codebase integrity.
24
24
 
25
- The package includes configuration for [`NestJS`](https://nestjs.com/)
25
+ The package includes configuration for:
26
+ - [`NestJS`](https://nestjs.com/)
27
+ - [`React`](https://react.dev/)
28
+ - [`Vite`](https://vitejs.dev/)
29
+ - [`NextJS`](https://nextjs.org/)
26
30
 
27
31
  ## Installation
28
32
 
@@ -71,6 +75,27 @@ This config includes base config
71
75
  + "extends": ["@nedcloarbr/biome-config/nestjs"]
72
76
  ```
73
77
 
78
+ ### [`React`](https://react.dev/)
79
+ This config includes base config
80
+
81
+ ```diff
82
+ # biome.json
83
+ + "extends": ["@nedcloarbr/biome-config/react"]
84
+ ```
85
+
86
+ If you're in a [`Vite`](https://vitejs.dev/) Project \
87
+ Install this [Vite Plugin](https://github.com/skrulling/vite-plugin-biome) and follow the configuration guide
88
+
89
+ If you're in a [`NextJS`](https://nextjs.org/) Project \
90
+ You will need to disable eslint checking since NextJS doesn't [support Biome](https://github.com/vercel/next.js/pull/67280) natively yet
91
+
92
+ ``` diff
93
+ # next.config.js
94
+ + eslint: {
95
+ + ignoreDuringBuilds: true,
96
+ + }
97
+ ```
98
+
74
99
  ### `Ignore` (an array of commonly ignored folders)
75
100
 
76
101
  This config don't includes base config
@@ -86,10 +111,10 @@ This config don't includes base config
86
111
  Add support for other types of projects
87
112
 
88
113
  - Configs
89
- - [ ] ReactJS
90
- - [ ] Vanilla
91
- - [ ] Vite
92
- - [ ] NextJS
114
+ - [x] ReactJS
115
+ - [x] Vanilla
116
+ - [x] Vite
117
+ - [x] NextJS
93
118
  - [x] NodeJS
94
119
  - [x] Vanilla
95
120
  - [x] TypeScript
package/base.json CHANGED
@@ -58,6 +58,7 @@
58
58
  "noNonNullAssertion": "off",
59
59
  "useAsConstAssertion": "warn",
60
60
  "useConst": "error",
61
+ "useNodejsImportProtocol": "error",
61
62
  "useShorthandArrayType": "error",
62
63
  "useSingleVarDeclarator": "error"
63
64
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nedcloarbr/biome-config",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "BiomeJS Configuration used by NedcloarBR in their projects",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -30,11 +30,13 @@
30
30
  ".": "./base.json",
31
31
  "./base": "./base.json",
32
32
  "./nestjs": "./nestjs.json",
33
+ "./react": "./react.json",
33
34
  "./ignore": "./ignore.json"
34
35
  },
35
36
  "files": [
36
37
  "base.json",
37
38
  "nestjs.json",
39
+ "react.json",
38
40
  "ignore.json"
39
41
  ],
40
42
  "packageManager": "yarn@4.3.1",
package/react.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
3
+ "extends": ["./base.json"],
4
+ "javascript": {
5
+ "jsxRuntime": "transparent"
6
+ },
7
+ "linter": {
8
+ "rules": {
9
+ "a11y": {
10
+ "all": true
11
+ },
12
+ "nursery": {
13
+ "noUnknownFunction": "error",
14
+ "noUnknownUnit": "error",
15
+ "useSortedClasses": "error"
16
+ },
17
+ "security": {
18
+ "noDangerouslySetInnerHtml": "error",
19
+ "noDangerouslySetInnerHtmlWithChildren": "error"
20
+ },
21
+ "style": {
22
+ "noImplicitBoolean": "error",
23
+ "useFragmentSyntax": "error"
24
+ },
25
+ "suspicious": {
26
+ "noSuspiciousSemicolonInJsx": "error"
27
+ }
28
+ }
29
+ }
30
+ }