@neovici/cfg 1.13.2 → 1.14.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/eslint/index.js CHANGED
@@ -1,16 +1,13 @@
1
1
  module.exports = {
2
2
  env: {
3
3
  browser: true,
4
- es6: true
4
+ es6: true,
5
5
  },
6
- extends: ['eslint:recommended', 'plugin:import/recommended', 'prettier'],
7
- plugins: ['html'],
8
- parser: '@babel/eslint-parser', // so dynamic `import` is recognized
9
6
  parserOptions: {
10
- sourceType: 'module',
11
- ecmaVersion: 2018,
12
- requireConfigFile: false
7
+ ecmaVersion: 'latest',
13
8
  },
9
+ plugins: ['html'],
10
+ extends: ['eslint:recommended', 'plugin:import/recommended', 'prettier'],
14
11
  rules: {
15
12
  'accessor-pairs': 'error',
16
13
  'array-callback-return': 'warn',
@@ -32,16 +29,16 @@ module.exports = {
32
29
  'warn',
33
30
  {
34
31
  code: 160,
35
- tabWidth: 2
36
- }
32
+ tabWidth: 2,
33
+ },
37
34
  ],
38
35
  'max-lines': [
39
36
  'warn',
40
37
  {
41
38
  max: 350,
42
39
  skipBlankLines: true,
43
- skipComments: true
44
- }
40
+ skipComments: true,
41
+ },
45
42
  ],
46
43
  'max-lines-per-function': [
47
44
  'warn',
@@ -49,8 +46,8 @@ module.exports = {
49
46
  max: 50,
50
47
  IIFEs: false,
51
48
  skipBlankLines: true,
52
- skipComments: true
53
- }
49
+ skipComments: true,
50
+ },
54
51
  ],
55
52
  'max-nested-callbacks': ['error', 5],
56
53
  'max-params': ['error', 5],
@@ -58,15 +55,15 @@ module.exports = {
58
55
  'max-statements-per-line': [
59
56
  'error',
60
57
  {
61
- max: 1
62
- }
58
+ max: 1,
59
+ },
63
60
  ],
64
61
  'new-cap': [
65
62
  'error',
66
63
  {
67
64
  capIsNew: true,
68
- newIsCap: true
69
- }
65
+ newIsCap: true,
66
+ },
70
67
  ],
71
68
  'no-alert': 'error',
72
69
  'no-console': 'error',
@@ -117,8 +114,8 @@ module.exports = {
117
114
  {
118
115
  const: 'consecutive',
119
116
  let: 'always',
120
- var: 'always'
121
- }
117
+ var: 'always',
118
+ },
122
119
  ],
123
120
  'prefer-arrow-callback': 'error',
124
121
  'prefer-const': 'error',
@@ -126,12 +123,16 @@ module.exports = {
126
123
  radix: 'error',
127
124
  'require-unicode-regexp': 'error',
128
125
  strict: 'error',
129
- 'valid-jsdoc': 'error'
126
+ 'valid-jsdoc': 'error',
130
127
  },
131
128
  overrides: [
129
+ {
130
+ files: '**/*.+(ts|tsx)',
131
+ extends: './typescript',
132
+ },
132
133
  {
133
134
  files: ['**/*.test.js'],
134
- extends: './test'
135
- }
136
- ]
135
+ extends: './test',
136
+ },
137
+ ],
137
138
  };
package/eslint/test.js CHANGED
@@ -1,8 +1,4 @@
1
1
  module.exports = {
2
- parserOptions: {
3
- // for async/await test functions
4
- ecmaVersion: 2018
5
- },
6
2
  env: {
7
3
  mocha: true
8
4
  },
@@ -0,0 +1,12 @@
1
+ module.exports = {
2
+ parser: '@typescript-eslint/parser',
3
+ plugins: ['@typescript-eslint'],
4
+ extends: [
5
+ 'plugin:@typescript-eslint/recommended',
6
+ 'plugin:import/typescript',
7
+ ],
8
+ rules: {
9
+ 'no-unused-vars': 'off',
10
+ '@typescript-eslint/no-unused-vars': 'error',
11
+ },
12
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neovici/cfg",
3
- "version": "1.13.2",
3
+ "version": "1.14.0",
4
4
  "description": "Configuration for Neovici packages",
5
5
  "homepage": "https://github.com/Neovici/cfg#readme",
6
6
  "bugs": {
@@ -45,17 +45,18 @@
45
45
  ]
46
46
  },
47
47
  "dependencies": {
48
- "@babel/core": "^7.18.0",
49
- "@babel/eslint-parser": "^7.16.0",
48
+ "@typescript-eslint/eslint-plugin": "^5.26.0",
49
+ "@typescript-eslint/parser": "^5.26.0",
50
50
  "@web/test-runner": "^0.13.27",
51
51
  "@web/test-runner-playwright": "^0.8.8",
52
- "eslint": "^8.15.0",
52
+ "eslint": "^8.16.0",
53
53
  "eslint-config-prettier": "^8.4.0",
54
54
  "eslint-import-resolver-alias": "^1.1.2",
55
55
  "eslint-plugin-html": "^6.2.0",
56
56
  "eslint-plugin-import": "^2.25.0",
57
57
  "eslint-plugin-mocha": "^10.0.0",
58
- "prettier": "^2.5.0"
58
+ "prettier": "^2.5.0",
59
+ "typescript": "^4.7.2"
59
60
  },
60
61
  "devDependencies": {
61
62
  "@commitlint/cli": "^17.0.0",