@vonage/eslint-config 1.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.
Files changed (2) hide show
  1. package/lib/index.js +51 -0
  2. package/package.json +28 -0
package/lib/index.js ADDED
@@ -0,0 +1,51 @@
1
+ import eslint from "@eslint/js";
2
+ import tseslint from 'typescript-eslint'
3
+ import stylisticJs from '@stylistic/eslint-plugin-js'
4
+ import jest from 'eslint-plugin-jest';
5
+ import nodePlugin from 'eslint-plugin-n';
6
+
7
+ export const baseConfig = [
8
+ eslint.configs.recommended,
9
+ stylisticJs.configs['disable-legacy'],
10
+ {
11
+ plugins: {
12
+ '@stylistic/js': stylisticJs
13
+ },
14
+ rules: {
15
+ '@stylistic/js/semi': ['error', 'always'],
16
+
17
+ }
18
+ }
19
+ ];
20
+
21
+ export const typescriptConfig = [
22
+ ...baseConfig,
23
+ {
24
+ plugins: {
25
+ '@typescript-eslint/parser': tseslint.plugin,
26
+ },
27
+ languageOptions: {
28
+ parser: tseslint.parser,
29
+ },
30
+ },
31
+ ...tseslint.configs.recommended,
32
+ ]
33
+
34
+ export const jestConfig = [
35
+ jest.configs['flat/recommended'],
36
+ jest.configs['flat/style'],
37
+ ]
38
+
39
+ export const nodeConfig = [
40
+ nodePlugin.configs['flat/recommended'],
41
+
42
+ ]
43
+
44
+ export default {
45
+ configs: {
46
+ base: baseConfig,
47
+ typescript: typescriptConfig,
48
+ jest: jestConfig,
49
+ node: nodeConfig,
50
+ }
51
+ }
package/package.json ADDED
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "@vonage/eslint-config",
3
+ "version": "1.0.0",
4
+ "description": "ESLint rules for Vonage",
5
+ "main": "lib/index.js",
6
+ "type": "module",
7
+ "scripts": {
8
+ "lint": "eslint ."
9
+ },
10
+ "author": "",
11
+ "license": "Apache-2.0",
12
+ "files": [
13
+ "src"
14
+ ],
15
+ "dependencies": {
16
+ "@eslint/js": "9.3.0",
17
+ "@stylistic/eslint-plugin": "2.1.0",
18
+ "@stylistic/eslint-plugin-ts": "2.1.0",
19
+ "eslint": "9.3.0",
20
+ "eslint-plugin-jest": "28.5.0",
21
+ "eslint-plugin-jsdoc": "48.2.6",
22
+ "eslint-plugin-n": "17.7.0",
23
+ "typescript-eslint": "8.0.0-alpha.20"
24
+ },
25
+ "devDependencies": {
26
+ "jest": "29.7.0"
27
+ }
28
+ }