@balena/lint 7.2.5 → 7.2.6

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.
@@ -1,149 +1,137 @@
1
1
  module.exports = {
2
- "env": {
3
- "browser": true,
4
- "es6": true,
5
- "node": true
2
+ env: {
3
+ browser: true,
4
+ es6: true,
5
+ node: true,
6
6
  },
7
- "parser": "@typescript-eslint/parser",
8
- "parserOptions": {
9
- "project": "tsconfig.json",
10
- "sourceType": "module"
7
+ parser: '@typescript-eslint/parser',
8
+ parserOptions: {
9
+ project: 'tsconfig.json',
10
+ sourceType: 'module',
11
11
  },
12
- "plugins": [
13
- "eslint-plugin-jsdoc",
14
- "eslint-plugin-react",
15
- "@typescript-eslint",
16
- "no-only-tests",
17
- "chai-friendly"
12
+ plugins: [
13
+ 'eslint-plugin-jsdoc',
14
+ 'eslint-plugin-react',
15
+ '@typescript-eslint',
16
+ 'no-only-tests',
17
+ 'chai-friendly',
18
18
  ],
19
- "extends": [
20
- "eslint:recommended",
21
- "plugin:@typescript-eslint/recommended",
22
- "plugin:chai-friendly/recommended",
23
- "prettier"
19
+ extends: [
20
+ 'eslint:recommended',
21
+ 'plugin:@typescript-eslint/recommended',
22
+ 'plugin:chai-friendly/recommended',
23
+ 'prettier',
24
24
  ],
25
- "rules": {
26
- "@typescript-eslint/adjacent-overload-signatures": "error",
27
- "@typescript-eslint/array-type": [
28
- "error",
25
+ rules: {
26
+ '@typescript-eslint/adjacent-overload-signatures': 'error',
27
+ '@typescript-eslint/array-type': [
28
+ 'error',
29
29
  {
30
- "default": "array-simple"
31
- }
30
+ default: 'array-simple',
31
+ },
32
32
  ],
33
- "@typescript-eslint/ban-ts-comment": [
34
- "error",
33
+ '@typescript-eslint/ban-ts-comment': [
34
+ 'error',
35
35
  {
36
- "ts-expect-error": "allow-with-description"
37
- }
36
+ 'ts-expect-error': 'allow-with-description',
37
+ },
38
38
  ],
39
- "@typescript-eslint/consistent-type-assertions": "error",
40
- "@typescript-eslint/naming-convention": [
41
- "error",
39
+ '@typescript-eslint/consistent-type-assertions': 'error',
40
+ '@typescript-eslint/naming-convention': [
41
+ 'error',
42
42
  {
43
- "selector": "variable",
44
- "format": [
45
- "camelCase",
46
- "UPPER_CASE",
47
- "PascalCase"
48
- ],
49
- "leadingUnderscore": "allow",
50
- "trailingUnderscore": "forbid"
43
+ selector: 'variable',
44
+ format: ['camelCase', 'UPPER_CASE', 'PascalCase'],
45
+ leadingUnderscore: 'allow',
46
+ trailingUnderscore: 'forbid',
51
47
  },
52
48
  {
53
- "selector": "variable",
54
- "modifiers": ["destructured"],
55
- "format": null
56
- }
57
- ],
58
- "@typescript-eslint/no-empty-function": "error",
59
- "@typescript-eslint/no-empty-interface": "error",
60
- "@typescript-eslint/no-explicit-any": "off",
61
- "@typescript-eslint/no-floating-promises": [
62
- "error",
63
- { "ignoreVoid": true }
49
+ selector: 'variable',
50
+ modifiers: ['destructured'],
51
+ format: null,
52
+ },
64
53
  ],
65
- "@typescript-eslint/no-shadow": [
66
- "error",
54
+ '@typescript-eslint/no-empty-function': 'error',
55
+ '@typescript-eslint/no-empty-interface': 'error',
56
+ '@typescript-eslint/no-explicit-any': 'off',
57
+ '@typescript-eslint/no-floating-promises': ['error', { ignoreVoid: true }],
58
+ '@typescript-eslint/no-shadow': [
59
+ 'error',
67
60
  {
68
- "hoist": "all"
69
- }
61
+ hoist: 'all',
62
+ },
70
63
  ],
71
- "@typescript-eslint/no-this-alias": "off",
72
- "@typescript-eslint/no-unused-vars": [
73
- "error",
64
+ '@typescript-eslint/no-this-alias': 'off',
65
+ '@typescript-eslint/no-unused-vars': [
66
+ 'error',
74
67
  {
75
68
  // Ideally we would want to block trailing unused destructured vars
76
69
  // similarly to how `"args": "after-used"` works, but this isn't supported at.
77
- "destructuredArrayIgnorePattern": "^_",
78
- "ignoreRestSiblings": true
70
+ destructuredArrayIgnorePattern: '^_',
71
+ ignoreRestSiblings: true,
79
72
  },
80
73
  ],
81
- "@typescript-eslint/prefer-for-of": "error",
82
- "@typescript-eslint/prefer-function-type": "error",
83
- "@typescript-eslint/prefer-namespace-keyword": "error",
84
- "@typescript-eslint/triple-slash-reference": [
85
- "error",
74
+ '@typescript-eslint/prefer-for-of': 'error',
75
+ '@typescript-eslint/prefer-function-type': 'error',
76
+ '@typescript-eslint/prefer-namespace-keyword': 'error',
77
+ '@typescript-eslint/triple-slash-reference': [
78
+ 'error',
86
79
  {
87
- "path": "always",
88
- "types": "prefer-import",
89
- "lib": "always"
90
- }
80
+ path: 'always',
81
+ types: 'prefer-import',
82
+ lib: 'always',
83
+ },
91
84
  ],
92
- "constructor-super": "error",
93
- "curly": "error",
94
- "eqeqeq": ["error", "always", {"null": "ignore"}],
95
- "guard-for-in": "error",
96
- "id-denylist": [
97
- "error",
98
- "any",
99
- "Number",
100
- "number",
101
- "String",
102
- "string",
103
- "Boolean",
104
- "boolean",
105
- "Undefined",
106
- "undefined"
85
+ 'constructor-super': 'error',
86
+ curly: 'error',
87
+ eqeqeq: ['error', 'always', { null: 'ignore' }],
88
+ 'guard-for-in': 'error',
89
+ 'id-denylist': [
90
+ 'error',
91
+ 'any',
92
+ 'Number',
93
+ 'number',
94
+ 'String',
95
+ 'string',
96
+ 'Boolean',
97
+ 'boolean',
98
+ 'Undefined',
99
+ 'undefined',
107
100
  ],
108
- "id-match": "error",
109
- "indent": "off",
110
- "jsdoc/check-alignment": "error",
111
- "new-parens": "error",
112
- "no-bitwise": "error",
113
- "no-caller": "error",
114
- "no-cond-assign": "error",
115
- "no-constant-binary-expression": "error",
116
- "no-debugger": "error",
117
- "no-empty": "error",
118
- "no-empty-function": "off",
119
- "no-eval": "error",
120
- "no-fallthrough": [
121
- "error",
101
+ 'id-match': 'error',
102
+ indent: 'off',
103
+ 'jsdoc/check-alignment': 'error',
104
+ 'new-parens': 'error',
105
+ 'no-bitwise': 'error',
106
+ 'no-caller': 'error',
107
+ 'no-cond-assign': 'error',
108
+ 'no-constant-binary-expression': 'error',
109
+ 'no-debugger': 'error',
110
+ 'no-empty': 'error',
111
+ 'no-empty-function': 'off',
112
+ 'no-eval': 'error',
113
+ 'no-fallthrough': [
114
+ 'error',
122
115
  {
123
- "allowEmptyCase": true,
124
- "commentPattern": "break[\\s\\w]*omitted"
125
- }
126
- ],
127
- "no-new-wrappers": "error",
128
- "no-only-tests/no-only-tests": "error",
129
- "no-shadow": "off",
130
- "no-throw-literal": "error",
131
- "no-unused-expressions": "off",
132
- "no-var": "error",
133
- "one-var": [
134
- "error",
135
- "never"
116
+ allowEmptyCase: true,
117
+ commentPattern: 'break[\\s\\w]*omitted',
118
+ },
136
119
  ],
137
- "prefer-const": ["error", {"destructuring": "all"}],
138
- "radix": "error",
139
- "spaced-comment": [
140
- "error",
141
- "always",
120
+ 'no-new-wrappers': 'error',
121
+ 'no-only-tests/no-only-tests': 'error',
122
+ 'no-shadow': 'off',
123
+ 'no-throw-literal': 'error',
124
+ 'no-unused-expressions': 'off',
125
+ 'no-var': 'error',
126
+ 'one-var': ['error', 'never'],
127
+ 'prefer-const': ['error', { destructuring: 'all' }],
128
+ radix: 'error',
129
+ 'spaced-comment': [
130
+ 'error',
131
+ 'always',
142
132
  {
143
- "markers": [
144
- "/"
145
- ]
146
- }
147
- ]
148
- }
133
+ markers: ['/'],
134
+ },
135
+ ],
136
+ },
149
137
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@balena/lint",
3
- "version": "7.2.5",
3
+ "version": "7.2.6",
4
4
  "description": "Balena.io eslint & prettier wrapper",
5
5
  "bin": {
6
6
  "balena-lint": "./bin/balena-lint"
@@ -19,10 +19,10 @@
19
19
  ],
20
20
  "scripts": {
21
21
  "build": "tsc && npm run prettify && npm run lint",
22
- "lint": "node ./bin/balena-lint -t tsconfig.json lib/",
22
+ "lint": "node ./bin/balena-lint -t tsconfig.json lib/ config/.eslintrc.js",
23
23
  "prepublish": "require-npm4-to-publish",
24
24
  "prepublishOnly": "npm run test",
25
- "prettify": "node ./bin/balena-lint -t tsconfig.json --fix lib/",
25
+ "prettify": "node ./bin/balena-lint -t tsconfig.json --fix -e ts -e js -t tsconfig.json lib/ config/.eslintrc.js",
26
26
  "test": "npm run build && npm run test:typescript",
27
27
  "test:typescript": "node ./bin/balena-lint -t tsconfig.test.json test/typescript/prettier -i",
28
28
  "prepare": "node -e \"try { require('husky').install() } catch (e) {if (e.code !== 'MODULE_NOT_FOUND') throw e}\""
@@ -59,7 +59,7 @@
59
59
  "require-npm4-to-publish": "^1.0.0"
60
60
  },
61
61
  "versionist": {
62
- "publishedAt": "2024-01-30T14:37:10.262Z"
62
+ "publishedAt": "2024-01-30T14:45:44.276Z"
63
63
  },
64
64
  "engines": {
65
65
  "node": ">=16.0.0",
package/tsconfig.json CHANGED
@@ -10,9 +10,10 @@
10
10
  "removeComments": true,
11
11
  "sourceMap": true,
12
12
  "moduleResolution": "node",
13
- "baseUrl": ".",
13
+ "baseUrl": "."
14
14
  },
15
15
  "include": [
16
- "./lib/**/*.ts"
16
+ "./lib/**/*",
17
+ "./config/.eslintrc.js"
17
18
  ]
18
19
  }