@itcase/lint 1.1.70 → 1.1.71

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,14 +1,29 @@
1
- import { wrapArrayWithCaretAndDollarAnchors } from '../utils.js'
2
-
3
- // In what order they are written, that’s how they will be sorted
1
+ // In what order they are written, that's how they will be sorted
4
2
  // В каком порядке они записаны, так они и будут отсортированы
5
3
  const groups = ['id', 'unknown', 'is', 'callback', 'set']
6
4
 
7
- const customRulesForGroups = {
8
- is: '^is.*',
9
- callback: '^on.*',
10
- set: '^set.*',
11
- }
5
+ const customGroups = [
6
+ {
7
+ groupName: 'id',
8
+ elementNamePattern: '^id$',
9
+ },
10
+ {
11
+ groupName: 'unknown',
12
+ elementNamePattern: '^unknown$',
13
+ },
14
+ {
15
+ groupName: 'is',
16
+ elementNamePattern: '^is.*',
17
+ },
18
+ {
19
+ groupName: 'callback',
20
+ elementNamePattern: '^on.*',
21
+ },
22
+ {
23
+ groupName: 'set',
24
+ elementNamePattern: '^set.*',
25
+ },
26
+ ]
12
27
 
13
28
  const sortInterfaces = [
14
29
  'error',
@@ -16,10 +31,7 @@ const sortInterfaces = [
16
31
  type: 'natural',
17
32
  order: 'asc',
18
33
  groups: groups,
19
- customGroups: {
20
- ...wrapArrayWithCaretAndDollarAnchors(groups),
21
- ...customRulesForGroups,
22
- },
34
+ customGroups: customGroups,
23
35
  },
24
36
  ]
25
37
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itcase/lint",
3
- "version": "1.1.70",
3
+ "version": "1.1.71",
4
4
  "author": "ITCase",
5
5
  "description": "Code style linter configuration presets",
6
6
  "engines": {