@oncehub/eslint-config 3.0.0 → 3.0.2
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 +5 -4
- package/index.js +5 -3
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -20,12 +20,13 @@ Note that it requires ESlint v9 and above.
|
|
|
20
20
|
|
|
21
21
|
## Usage
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
Import the package inside of an eslint.config.js file and add it into the exported array, like this:
|
|
24
24
|
|
|
25
25
|
```js
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
// eslint.config.js
|
|
27
|
+
import oncehub from "@oncehub/eslint-config";
|
|
28
|
+
|
|
29
|
+
export default [...oncehub];
|
|
29
30
|
```
|
|
30
31
|
|
|
31
32
|
## Development
|
package/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import js from "@eslint/js";
|
|
2
2
|
import prettierConfig from "eslint-config-prettier";
|
|
3
3
|
import * as typescriptEslintPlugin from "@typescript-eslint/eslint-plugin";
|
|
4
|
+
import tsParser from "@typescript-eslint/parser";
|
|
4
5
|
import sonarjs from "eslint-plugin-sonarjs";
|
|
6
|
+
import globals from "globals";
|
|
5
7
|
|
|
6
8
|
export default [
|
|
7
9
|
js.configs.recommended,
|
|
@@ -11,12 +13,12 @@ export default [
|
|
|
11
13
|
files: ["**/*.{js,ts,jsx,tsx}"],
|
|
12
14
|
languageOptions: {
|
|
13
15
|
globals: {
|
|
16
|
+
...globals.browser,
|
|
17
|
+
...globals.node,
|
|
14
18
|
Atomics: "readonly",
|
|
15
19
|
SharedArrayBuffer: "readonly",
|
|
16
|
-
es6: true,
|
|
17
|
-
node: true,
|
|
18
20
|
},
|
|
19
|
-
parser:
|
|
21
|
+
parser: tsParser,
|
|
20
22
|
parserOptions: {
|
|
21
23
|
ecmaVersion: 2018,
|
|
22
24
|
sourceType: "module",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oncehub/eslint-config",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.2",
|
|
4
4
|
"description": "ESLint configuration for micro-services built using Node.js and TypeScript",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"@types/eslint__js": "^8.42.3",
|
|
18
18
|
"eslint-config-prettier": "^9.1.0",
|
|
19
19
|
"eslint-plugin-sonarjs": "^2.0.4",
|
|
20
|
+
"globals": "^15.12.0",
|
|
20
21
|
"typescript-eslint": "^8.13.0"
|
|
21
22
|
},
|
|
22
23
|
"peerDependencies": {
|