@eagleoutice/eslint-config-flowr 1.0.43 → 2.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # Linter rules for flowR
2
2
 
3
3
  This configuration contains just the eslint-rules.
4
- For flowR's capabilty of linting R code, please look at the [corresponding wiki](https://github.com/flowr-analysis/flowr/wiki/Linter).
4
+ For flowR's capability of linting R code, please look at the [corresponding wiki](https://github.com/flowr-analysis/flowr/wiki/Linter).
5
5
 
6
6
  See the main project at <https://github.com/flowr-analysis/flowr>.
package/index.js CHANGED
@@ -1,291 +1,194 @@
1
- module.exports = {
2
- "env": {
3
- "browser": false,
4
- "node": true,
5
- "es2022": true
6
- },
7
- "extends": [
8
- "eslint:recommended",
9
- "plugin:@typescript-eslint/recommended-requiring-type-checking",
10
- "plugin:@typescript-eslint/strict",
11
- "plugin:@typescript-eslint/recommended",
12
- "plugin:jsdoc/recommended"
13
- ],
14
- "overrides": [],
15
- "parserOptions": {
16
- "ecmaVersion": "latest",
17
- "sourceType": "module",
18
- "project": "./tsconfig.json"
19
- },
20
- "parser": "@typescript-eslint/parser",
21
- "plugins": [
22
- "@typescript-eslint",
23
- "eslint-plugin-tsdoc",
24
- "eslint-plugin-unused-imports",
25
- "jsdoc",
26
- "check-file",
27
- "@stylistic",
28
- "import"
29
- ],
30
- "rules": {
31
- "@stylistic/object-curly-spacing": [
32
- "error",
33
- "always",
34
- { emptyObjects: "never" }
35
- ],
36
- "@stylistic/comma-spacing": [
37
- "error",
38
- {
39
- "before": false,
40
- "after": true
41
- }
42
- ],
43
- "@stylistic/indent": [
44
- "error",
45
- "tab",
46
- {
47
- "FunctionDeclaration": {
48
- "parameters": "first"
49
- },
50
- "ObjectExpression": 1,
51
- "SwitchCase": 1
52
- }
53
- ],
54
- '@stylistic/padding-line-between-statements': [
55
- 'error',
56
- { blankLine: 'never', prev: 'import', next: 'import' },
57
- ],
58
- '@stylistic/comma-dangle': [
59
- 'error',
60
- "only-multiline"
61
- ],
62
- "@stylistic/quotes": [
63
- "error",
64
- "single",
65
- {
66
- "avoidEscape": true
67
- }
68
- ],
69
- "jsdoc/check-alignment": "error",
70
- "jsdoc/check-indentation": "off",
71
- "jsdoc/no-types": "error",
72
- "jsdoc/no-undefined-types": "off",
73
- "jsdoc/check-tag-names": "off",
74
- "jsdoc/require-param": "off",
75
- "jsdoc/require-description": "off",
76
- "jsdoc/require-param-description": "off",
77
- "jsdoc/require-returns": "off",
78
- "jsdoc/require-property": "off",
79
- "jsdoc/require-throws": "off",
80
- "jsdoc/require-throws-type": "off",
81
- "jsdoc/require-file-overview": "off",
82
- "jsdoc/check-param-names": "off",
83
- "jsdoc/require-jsdoc": [
84
- "error",
85
- {
86
- "publicOnly": true,
87
- "checkGetters": false,
88
- "checkSetters": false,
89
- "require": {
90
- "FunctionDeclaration": true
91
- }
92
- }
93
- ],
94
- "jsdoc/require-param-type": "off",
95
- "jsdoc/require-returns-type": "off",
96
- "jsdoc/require-yields": "off",
97
- "@stylistic/no-mixed-spaces-and-tabs": [
98
- "error",
99
- "smart-tabs"
100
- ],
101
- "no-warning-comments": [
102
- "error",
103
- {
104
- "terms": [
105
- "todo",
106
- "fixme",
107
- "xxx"
108
- ],
109
- "location": "anywhere"
110
- }
111
- ],
112
- "@typescript-eslint/non-nullable-type-assertion-style": "off",
113
- "@typescript-eslint/no-unsafe-enum-comparison": "off",
114
- "@typescript-eslint/no-redundant-type-constituents": "off",
115
- "@typescript-eslint/consistent-type-assertions": [
116
- "error",
117
- {
118
- "assertionStyle": "as"
119
- }
120
- ],
121
- "@stylistic/key-spacing": [
122
- "error",
123
- {
124
- "align": "value"
125
- }
126
- ],
127
- "@stylistic/no-tabs": [
128
- "error",
129
- {
130
- "allowIndentationTabs": true
131
- }
132
- ],
133
- "@stylistic/semi": [
134
- "error",
135
- "always",
136
- {
137
- "omitLastInOneLineBlock": true
138
- }
139
- ],
140
- "@stylistic/space-before-function-paren": [
141
- "error",
142
- "never"
143
- ],
144
- "@stylistic/keyword-spacing": "off",
145
- "check-file/filename-naming-convention": [
146
- "error",
147
- {
148
- "**/*.ts": "?(\\d+-)?([A-Z])+([a-z])*((-|.)?([A-Z])+([a-z]))"
149
- }
150
- ],
151
- "check-file/folder-match-with-fex": [
152
- "error",
153
- {
154
- "*.spec.{js,jsx,ts,tsx}": "test/**"
155
- }
156
- ],
157
- "@stylistic/keyword-spacing": [
158
- "error",
159
- {
160
- "before": true,
161
- "after": true,
162
- "overrides": {
163
- "if": {
164
- "after": false
165
- },
166
- "for": {
167
- "after": false
168
- },
169
- "while": {
170
- "after": false
171
- },
172
- "do": {
173
- "after": false
174
- },
175
- "catch": {
176
- "after": false
177
- },
178
- "switch": {
179
- "after": false
180
- },
181
- "default": {
182
- "after": false
183
- },
184
- "throw": {
185
- "after": false
186
- }
187
- }
188
- }
189
- ],
190
- "@stylistic/space-before-function-paren": [
191
- "error",
192
- "never"
193
- ],
194
- "@stylistic/no-trailing-spaces": "error",
195
- "@stylistic/space-infix-ops": [
196
- "error",
197
- {
198
- "int32Hint": false
199
- }
200
- ],
201
- "@typescript-eslint/no-unused-vars": "off",
202
- "unused-imports/no-unused-imports": "error",
203
- "unused-imports/no-unused-vars": [
204
- "error",
205
- {
206
- "vars": "all",
207
- "varsIgnorePattern": "^_",
208
- "args": "after-used",
209
- "argsIgnorePattern": "^_",
210
- },
211
- ],
212
- "tsdoc/syntax": "error",
213
- "@typescript-eslint/naming-convention": [
214
- "error",
215
- {
216
- "selector": "variable",
217
- "modifiers": [
218
- "const",
219
- "global",
220
- "exported"
221
- ],
222
- "format": [
223
- "camelCase",
224
- "PascalCase",
225
- "UPPER_CASE"
226
- ],
227
- "leadingUnderscore": "allow",
228
- "trailingUnderscore": "allow"
229
- },
230
- {
231
- "selector": "variable",
232
- "modifiers": [
233
- "const"
234
- ],
235
- "format": [
236
- "camelCase",
237
- "PascalCase"
238
- ],
239
- "leadingUnderscore": "allow",
240
- "trailingUnderscore": "allow"
241
- },
242
- {
243
- "selector": "enumMember",
244
- "format": [
245
- "StrictPascalCase"
246
- ],
247
- "leadingUnderscore": "forbid",
248
- "trailingUnderscore": "forbid"
249
- },
250
- {
251
- "selector": "typeLike",
252
- "format": [
253
- "PascalCase"
254
- ]
255
- }
256
- ],
257
- "@typescript-eslint/consistent-type-imports": ["error", {
258
- "prefer": "type-imports",
259
- "disallowTypeAnnotations": false,
260
- "fixStyle": "separate-type-imports"
261
- }],
262
- "curly": "error",
263
- "@stylistic/type-annotation-spacing": [
264
- "error",
265
- { "before": false, "after": true, "overrides": { "arrow": "ignore" } }
266
- ],
267
- "@stylistic/arrow-spacing": [
268
- "error",
269
- { "before": true, "after": true }
270
- ],
271
- "@stylistic/brace-style": [
272
- "error",
273
- "1tbs"
274
- ],
275
- "@stylistic/new-parens": "error",
276
- "import/no-duplicates": [
277
- "error",
278
- {
279
- "considerQueryString": true,
280
- "prefer-inline": false
281
- }
282
- ],
283
- "@typescript-eslint/no-invalid-void-type": [
284
- "error",
285
- {
286
- "allowInGenericTypeArguments": true,
287
- "allowAsThisParameter": true
288
- }
289
- ]
290
- }
291
- }
1
+ const js = require('@eslint/js');
2
+ const globals = require('globals');
3
+ const tseslint = require('@typescript-eslint/eslint-plugin');
4
+ const tsParser = require('@typescript-eslint/parser');
5
+ const stylistic = require('@stylistic/eslint-plugin');
6
+ const jsdoc = require('eslint-plugin-jsdoc');
7
+ const tsdoc = require('eslint-plugin-tsdoc');
8
+ const unusedImports = require('eslint-plugin-unused-imports');
9
+ const checkFile = require('eslint-plugin-check-file');
10
+ const importX = require('eslint-plugin-import-x');
11
+
12
+ module.exports = [
13
+ js.configs.recommended,
14
+ ...tseslint.configs['flat/recommended-type-checked'],
15
+ ...tseslint.configs['flat/strict'],
16
+ ...tseslint.configs['flat/recommended'],
17
+ jsdoc.configs['flat/recommended-typescript'],
18
+ {
19
+ languageOptions: {
20
+ ecmaVersion: 'latest',
21
+ sourceType: 'module',
22
+ globals: { ...globals.node },
23
+ parser: tsParser,
24
+ parserOptions: {
25
+ projectService: true
26
+ }
27
+ },
28
+ settings: {
29
+ 'import-x/resolver-next': [
30
+ importX.createNodeResolver({ extensions: ['.ts', '.tsx', '.mts', '.cts', '.js', '.jsx', '.mjs', '.cjs'] })
31
+ ]
32
+ },
33
+ plugins: {
34
+ '@typescript-eslint': tseslint,
35
+ '@stylistic': stylistic,
36
+ 'import-x': importX,
37
+ 'unused-imports': unusedImports,
38
+ 'check-file': checkFile,
39
+ tsdoc,
40
+ jsdoc
41
+ },
42
+ rules: {
43
+ '@stylistic/object-curly-spacing': ['error', 'always', { emptyObjects: 'never' }],
44
+ '@stylistic/comma-spacing': ['error', { before: false, after: true }],
45
+ '@stylistic/indent': ['error', 'tab', {
46
+ FunctionDeclaration: { parameters: 'first' },
47
+ ObjectExpression: 1,
48
+ SwitchCase: 1
49
+ }],
50
+ '@stylistic/padding-line-between-statements': [
51
+ 'error',
52
+ { blankLine: 'never', prev: 'import', next: 'import' }
53
+ ],
54
+ '@stylistic/comma-dangle': ['error', 'only-multiline'],
55
+ '@stylistic/quotes': ['error', 'single', { avoidEscape: true }],
56
+
57
+ 'jsdoc/check-alignment': 'error',
58
+ 'jsdoc/check-indentation': 'off',
59
+ 'jsdoc/no-types': 'error',
60
+ 'jsdoc/no-undefined-types': 'off',
61
+ 'jsdoc/check-tag-names': 'off',
62
+ 'jsdoc/require-param': 'off',
63
+ 'jsdoc/require-description': 'off',
64
+ 'jsdoc/require-param-description': 'off',
65
+ 'jsdoc/require-returns': 'off',
66
+ 'jsdoc/require-property': 'off',
67
+ 'jsdoc/require-throws': 'off',
68
+ 'jsdoc/require-throws-type': 'off',
69
+ 'jsdoc/require-file-overview': 'off',
70
+ 'jsdoc/check-param-names': 'off',
71
+ 'jsdoc/require-jsdoc': ['error', {
72
+ publicOnly: true,
73
+ checkGetters: false,
74
+ checkSetters: false,
75
+ require: { FunctionDeclaration: true }
76
+ }],
77
+ 'jsdoc/require-param-type': 'off',
78
+ 'jsdoc/require-returns-type': 'off',
79
+ 'jsdoc/require-property-type': 'off',
80
+ 'jsdoc/require-yields-type': 'off',
81
+ 'jsdoc/require-next-type': 'off',
82
+ 'jsdoc/require-yields': 'off',
83
+
84
+ '@stylistic/no-mixed-spaces-and-tabs': ['error', 'smart-tabs'],
85
+ 'no-warning-comments': ['error', {
86
+ terms: ['todo', 'fixme', 'xxx'],
87
+ location: 'anywhere'
88
+ }],
89
+
90
+ '@typescript-eslint/non-nullable-type-assertion-style': 'off',
91
+ '@typescript-eslint/no-unsafe-enum-comparison': 'off',
92
+ '@typescript-eslint/no-redundant-type-constituents': 'off',
93
+ '@typescript-eslint/consistent-type-assertions': ['error', { assertionStyle: 'as' }],
94
+ '@typescript-eslint/no-unnecessary-type-assertion': ['error', { typesToIgnore: ['never'] }],
95
+ /* bit-flag enums may spell their members as shifts, so the bit is the number you read */
96
+ '@typescript-eslint/prefer-literal-enum-member': ['error', { allowBitwiseExpressions: true }],
97
+
98
+ '@stylistic/key-spacing': ['error', { align: 'value' }],
99
+ '@stylistic/no-tabs': ['error', { allowIndentationTabs: true }],
100
+ '@stylistic/semi': ['error', 'always', { omitLastInOneLineBlock: true }],
101
+ '@stylistic/space-before-function-paren': ['error', 'never'],
102
+ '@stylistic/keyword-spacing': ['error', {
103
+ before: true,
104
+ after: true,
105
+ overrides: {
106
+ if: { after: false },
107
+ for: { after: false },
108
+ while: { after: false },
109
+ do: { after: false },
110
+ catch: { after: false },
111
+ switch: { after: false },
112
+ default: { after: false },
113
+ throw: { after: false }
114
+ }
115
+ }],
116
+
117
+ 'check-file/filename-naming-convention': ['error', {
118
+ '**/*.ts': '?(\\d+-)?([A-Z])+([a-z])*((-|.)?([A-Z])+([a-z]))'
119
+ }],
120
+ 'check-file/folder-match-with-fex': ['error', {
121
+ '*.spec.{js,jsx,ts,tsx}': 'test/**'
122
+ }],
123
+
124
+ '@stylistic/no-trailing-spaces': 'error',
125
+ '@stylistic/space-infix-ops': ['error', { int32Hint: false }],
126
+
127
+ '@typescript-eslint/no-unused-vars': 'off',
128
+ 'unused-imports/no-unused-imports': 'error',
129
+ 'unused-imports/no-unused-vars': ['error', {
130
+ vars: 'all',
131
+ varsIgnorePattern: '^_',
132
+ args: 'after-used',
133
+ argsIgnorePattern: '^_'
134
+ }],
135
+
136
+ 'tsdoc/syntax': 'error',
137
+
138
+ '@typescript-eslint/naming-convention': ['error',
139
+ {
140
+ selector: 'variable',
141
+ modifiers: ['const', 'global', 'exported'],
142
+ format: ['camelCase', 'PascalCase', 'UPPER_CASE'],
143
+ leadingUnderscore: 'allow',
144
+ trailingUnderscore: 'allow'
145
+ },
146
+ {
147
+ selector: 'variable',
148
+ modifiers: ['const'],
149
+ format: ['camelCase', 'PascalCase'],
150
+ leadingUnderscore: 'allow',
151
+ trailingUnderscore: 'allow'
152
+ },
153
+ {
154
+ selector: 'enumMember',
155
+ format: ['StrictPascalCase'],
156
+ leadingUnderscore: 'forbid',
157
+ trailingUnderscore: 'forbid'
158
+ },
159
+ {
160
+ selector: 'typeLike',
161
+ format: ['PascalCase']
162
+ }
163
+ ],
164
+ '@typescript-eslint/consistent-type-imports': ['error', {
165
+ prefer: 'type-imports',
166
+ disallowTypeAnnotations: false,
167
+ fixStyle: 'separate-type-imports'
168
+ }],
169
+ '@typescript-eslint/no-import-type-side-effects': 'error',
170
+ '@typescript-eslint/consistent-type-exports': 'error',
171
+
172
+ curly: 'error',
173
+
174
+ '@stylistic/type-annotation-spacing': ['error', {
175
+ before: false,
176
+ after: true,
177
+ overrides: { arrow: 'ignore' }
178
+ }],
179
+ '@stylistic/arrow-spacing': ['error', { before: true, after: true }],
180
+ '@stylistic/brace-style': ['error', '1tbs'],
181
+ '@stylistic/new-parens': 'error',
182
+
183
+ 'import-x/no-duplicates': ['error', {
184
+ considerQueryString: true,
185
+ 'prefer-inline': false
186
+ }],
187
+
188
+ '@typescript-eslint/no-invalid-void-type': ['error', {
189
+ allowInGenericTypeArguments: true,
190
+ allowAsThisParameter: true
191
+ }]
192
+ }
193
+ }
194
+ ];
package/package.json CHANGED
@@ -1,23 +1,28 @@
1
1
  {
2
2
  "name": "@eagleoutice/eslint-config-flowr",
3
- "version": "1.0.43",
3
+ "version": "2.0.2",
4
4
  "description": "Linting rules for flowr and friends",
5
5
  "license": "ISC",
6
6
  "main": "index.js",
7
+ "files": [
8
+ "index.js"
9
+ ],
7
10
  "scripts": {
8
11
  "publish-npm": "npm publish --access public"
9
12
  },
13
+ "dependencies": {
14
+ "@eslint/js": "^10.0.1",
15
+ "globals": "^17.7.0"
16
+ },
10
17
  "peerDependencies": {
11
18
  "@stylistic/eslint-plugin": "^5.7.1",
12
- "@stylistic/eslint-plugin-plus": "^4.4.1",
13
19
  "@typescript-eslint/eslint-plugin": "^8.54.0",
14
- "eslint": "^9.39.2",
20
+ "@typescript-eslint/parser": "^8.54.0",
21
+ "eslint": "^10.0.0",
15
22
  "eslint-plugin-check-file": "^3.3.1",
16
- "eslint-plugin-import": "^2.32.0",
17
- "eslint-plugin-n": "^17.23.2",
18
- "eslint-plugin-promise": "^7.2.1",
23
+ "eslint-plugin-import-x": "^4.17.1",
24
+ "eslint-plugin-jsdoc": "^62.5.0",
19
25
  "eslint-plugin-tsdoc": "^0.5.0",
20
- "eslint-plugin-unused-imports": "^4.3.0",
21
- "eslint-plugin-jsdoc": "^62.5.0"
26
+ "eslint-plugin-unused-imports": "^4.3.0"
22
27
  }
23
28
  }
@@ -1,39 +0,0 @@
1
- permissions:
2
- contents: write
3
- name: release
4
- on:
5
- push:
6
- branches: [main]
7
- jobs:
8
- release:
9
- runs-on: ubuntu-latest
10
- steps:
11
- - name: Checkout repository
12
- uses: actions/checkout@v4
13
- with:
14
- token: ${{ secrets.PUSH_TOKEN }}
15
- - name: Configure git user
16
- run: |
17
- git config --local user.email "action@github.com"
18
- git config --local user.name "GitHub Action"
19
-
20
- - name: Install node
21
- uses: actions/setup-node@v4
22
- with:
23
- node-version: 21.6.x
24
- registry-url: 'https://registry.npmjs.org/'
25
- - name: Install deps
26
- run: npm ci
27
-
28
- - name: Bump version
29
- id: version
30
- run: npm version patch -m "[skip ci] Release %s"
31
- - name: Push version update commit
32
- run: |
33
- git push
34
- git push --tags
35
-
36
- - name: Publish
37
- run: npm run publish-npm
38
- env:
39
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}