@checkdigit/eslint-plugin 4.0.0 → 4.1.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/.github/workflows/ci.yml +72 -0
- package/.github/workflows/codeql-analysis.yml +31 -0
- package/.github/workflows/coverage.yml +46 -0
- package/README.md +5 -7
- package/SECURITY.md +14 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/no-uuid.d.ts +3 -0
- package/package.json +24 -36
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches:
|
|
6
|
+
- 'main'
|
|
7
|
+
|
|
8
|
+
env:
|
|
9
|
+
CI: true
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
pullRequestBuild:
|
|
13
|
+
name: Pull Request Build
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
strategy:
|
|
16
|
+
matrix:
|
|
17
|
+
node-version: [16.x, 18.x]
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v3
|
|
20
|
+
- name: Use Node.js ${{ matrix.node-version }}
|
|
21
|
+
uses: actions/setup-node@v3
|
|
22
|
+
with:
|
|
23
|
+
node-version: ${{ matrix.node-version }}
|
|
24
|
+
cache: 'npm'
|
|
25
|
+
- name: Install dependencies
|
|
26
|
+
run: npm ci --ignore-scripts
|
|
27
|
+
env:
|
|
28
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
29
|
+
- name: Audit Signatures
|
|
30
|
+
run: npm audit signatures
|
|
31
|
+
env:
|
|
32
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
33
|
+
- name: Compile
|
|
34
|
+
run: npm run ci:compile
|
|
35
|
+
- name: Check Code Style
|
|
36
|
+
run: npm run ci:style
|
|
37
|
+
- name: Perform Linting
|
|
38
|
+
run: npm run ci:lint
|
|
39
|
+
- name: Run Tests
|
|
40
|
+
run: npm run ci:test
|
|
41
|
+
|
|
42
|
+
branchBuild:
|
|
43
|
+
runs-on: ubuntu-latest
|
|
44
|
+
name: Branch Build
|
|
45
|
+
strategy:
|
|
46
|
+
matrix:
|
|
47
|
+
node-version: [16.x, 18.x]
|
|
48
|
+
steps:
|
|
49
|
+
- uses: actions/checkout@v3
|
|
50
|
+
with:
|
|
51
|
+
ref: ${{ github.event.pull_request.head.sha }}
|
|
52
|
+
- name: Use Node.js ${{ matrix.node-version }}
|
|
53
|
+
uses: actions/setup-node@v3
|
|
54
|
+
with:
|
|
55
|
+
node-version: ${{ matrix.node-version }}
|
|
56
|
+
cache: 'npm'
|
|
57
|
+
- name: Install dependencies
|
|
58
|
+
run: npm ci --ignore-scripts
|
|
59
|
+
env:
|
|
60
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
61
|
+
- name: Audit Signatures
|
|
62
|
+
run: npm audit signatures
|
|
63
|
+
env:
|
|
64
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
65
|
+
- name: Compile
|
|
66
|
+
run: npm run ci:compile
|
|
67
|
+
- name: Check Code Style
|
|
68
|
+
run: npm run ci:style
|
|
69
|
+
- name: Perform Linting
|
|
70
|
+
run: npm run ci:lint
|
|
71
|
+
- name: Run Tests
|
|
72
|
+
run: npm run ci:test
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: 'CodeQL'
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: ['main']
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: ['main']
|
|
8
|
+
schedule:
|
|
9
|
+
- cron: '44 8 * * 1'
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
analyze:
|
|
13
|
+
name: Analyze
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
permissions:
|
|
16
|
+
actions: read
|
|
17
|
+
contents: read
|
|
18
|
+
security-events: write
|
|
19
|
+
strategy:
|
|
20
|
+
fail-fast: false
|
|
21
|
+
matrix:
|
|
22
|
+
language: ['javascript']
|
|
23
|
+
steps:
|
|
24
|
+
- name: Checkout repository
|
|
25
|
+
uses: actions/checkout@v3
|
|
26
|
+
- name: Initialize CodeQL
|
|
27
|
+
uses: github/codeql-action/init@v2
|
|
28
|
+
with:
|
|
29
|
+
languages: ${{ matrix.language }}
|
|
30
|
+
- name: Perform CodeQL Analysis
|
|
31
|
+
uses: github/codeql-action/analyze@v2
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
name: Coverage
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches:
|
|
6
|
+
- 'main'
|
|
7
|
+
|
|
8
|
+
env:
|
|
9
|
+
CI: true
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
branchBuild:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
name: Branch Build
|
|
15
|
+
strategy:
|
|
16
|
+
matrix:
|
|
17
|
+
node-version: [16.x]
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v3
|
|
20
|
+
with:
|
|
21
|
+
ref: ${{ github.event.pull_request.head.sha }}
|
|
22
|
+
- name: Use Node.js ${{ matrix.node-version }}
|
|
23
|
+
uses: actions/setup-node@v3
|
|
24
|
+
with:
|
|
25
|
+
node-version: ${{ matrix.node-version }}
|
|
26
|
+
cache: 'npm'
|
|
27
|
+
- name: Install dependencies
|
|
28
|
+
run: npm ci --ignore-scripts
|
|
29
|
+
env:
|
|
30
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
31
|
+
- name: Calculate Code Coverage
|
|
32
|
+
run: npm run ci:coverage
|
|
33
|
+
- name: Create Coverage Report for base branch
|
|
34
|
+
run: |
|
|
35
|
+
mv coverage/lcov.info coverage/lcov_head.info
|
|
36
|
+
git fetch
|
|
37
|
+
git checkout origin/${{ github.event.pull_request.base.ref }}
|
|
38
|
+
npm ci --ignore-scripts && npm run ci:coverage
|
|
39
|
+
env:
|
|
40
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
41
|
+
- name: Post Coverage Report
|
|
42
|
+
uses: checkdigit/github-actions/coverage-reporter@main
|
|
43
|
+
with:
|
|
44
|
+
lcov-file: 'coverage/lcov_head.info'
|
|
45
|
+
lcov-base: 'coverage/lcov.info'
|
|
46
|
+
delete-old-comments: true
|
package/README.md
CHANGED
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
# checkdigit/eslint-plugin
|
|
2
2
|
|
|
3
|
-
[](https://github.com/checkdigit/eslint-plugin/blob/master/LICENSE.txt)
|
|
4
|
-
[](https://status.david-dm.org/gh/checkdigit/eslint-plugin.svg)
|
|
5
|
-
|
|
6
3
|
Copyright (c) 2021-2022 [Check Digit, LLC](https://checkdigit.com)
|
|
7
4
|
|
|
8
5
|
## Rules
|
|
9
6
|
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
- `@checkdigit/no-card-numbers`
|
|
8
|
+
- `@checkdigit/file-path-comment`
|
|
9
|
+
- `@checkdigit/no-uuid`
|
|
12
10
|
|
|
13
11
|
## Configurations
|
|
14
12
|
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
- `@checkdigit/all`
|
|
14
|
+
- `@checkdigit/recommended`
|
|
17
15
|
|
|
18
16
|
## License
|
|
19
17
|
|
package/SECURITY.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
## Supported Versions
|
|
4
|
+
|
|
5
|
+
These versions of `@checkdigit/eslint-plugin` are currently being supported with security updates.
|
|
6
|
+
|
|
7
|
+
| Version | Supported |
|
|
8
|
+
| ------- | ------------------ |
|
|
9
|
+
| \>= 4.0 | :white_check_mark: |
|
|
10
|
+
| \< 4.0 | :x: |
|
|
11
|
+
|
|
12
|
+
## Reporting a Vulnerability
|
|
13
|
+
|
|
14
|
+
Please create an issue at https://github.com/checkdigit/eslint-plugin/issues
|
package/dist/index.d.ts
CHANGED
|
@@ -2,18 +2,21 @@ declare const _default: {
|
|
|
2
2
|
rules: {
|
|
3
3
|
'file-path-comment': import("eslint").Rule.RuleModule;
|
|
4
4
|
'no-card-numbers': import("eslint").Rule.RuleModule;
|
|
5
|
+
'no-uuid': import("eslint").Rule.RuleModule;
|
|
5
6
|
};
|
|
6
7
|
configs: {
|
|
7
8
|
all: {
|
|
8
9
|
rules: {
|
|
9
10
|
'@checkdigit/no-card-numbers': string;
|
|
10
11
|
'@checkdigit/file-path-comment': string;
|
|
12
|
+
'@checkdigit/no-uuid': string;
|
|
11
13
|
};
|
|
12
14
|
};
|
|
13
15
|
recommended: {
|
|
14
16
|
rules: {
|
|
15
17
|
'@checkdigit/no-card-numbers': string;
|
|
16
18
|
'@checkdigit/file-path-comment': string;
|
|
19
|
+
'@checkdigit/no-uuid': string;
|
|
17
20
|
};
|
|
18
21
|
};
|
|
19
22
|
};
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const e=/\d{15,19}/gmu,t=["4111111111111111","111111111111111","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000"];function n(n,
|
|
1
|
+
"use strict";const e=/\d{15,19}/gmu,t=["4111111111111111","111111111111111","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000"];function n(n,o,i,r){const a=n.match(e);if(null===a)return;const s=a.filter((e=>e.split("").reverse().map((e=>parseInt(e,10))).reduce(((e,t,n)=>{let o=t;return n%2==1&&(o*=2,o>9&&(o=o%10+1)),e+o}),0)%10==0&&-1===t.indexOf(e)));1===s.length?void 0!==i?o.report({messageId:"CARD_NUMBER_FOUND",data:{number:s[0]},node:i}):void 0!==r&&o.report({messageId:"CARD_NUMBER_FOUND",data:{number:s[0]},loc:{start:r.start,end:r.end}}):s.length>1&&(void 0!==i?o.report({messageId:"CARD_NUMBERS_FOUND",data:{numbers:a.join(", ")},node:i}):void 0!==r&&o.report({messageId:"CARD_NUMBERS_FOUND",data:{numbers:a.join(", ")},loc:{start:r.start,end:r.end}}))}const o=/[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}/gmu;function i(e,t,n,i){const r=e.match(o);null!==r&&(1===r.length?void 0!==n?t.report({messageId:"UUID_FOUND",data:{uuid:r[0]},node:n}):void 0!==i&&t.report({messageId:"UUID_FOUND",data:{uuid:r[0]},loc:{start:i.start,end:i.end}}):r.length>1&&(void 0!==n?t.report({messageId:"UUIDS_FOUND",data:{uuids:r.join(", ")},node:n}):void 0!==i&&t.report({messageId:"UUIDS_FOUND",data:{uuids:r.join(", ")},loc:{start:i.start,end:i.end}})))}var r={rules:{"file-path-comment":{meta:{type:"suggestion",docs:{description:"Validate that first line of file is a path to the file",url:"https://github.com/checkdigit/eslint-plugin"},fixable:"code"},create(e){const t=e.getSourceCode().getLines()[0],n=e.getFilename().split("src/")[1];if(void 0===n)return{};if(t.startsWith("//")){const o=t.split("// ")[1];n!==o&&e.report({loc:{start:{line:0,column:0},end:{line:0,column:1}},message:"first line is a comment but is not a path to the file",fix:e=>e.replaceTextRange([0,t.length],`// ${n}`)})}else t.startsWith("/*")?e.report({loc:{start:{line:0,column:0},end:{line:0,column:1}},message:"first line cannot be a block comment",fix:e=>e.insertTextBeforeRange([0,0],`// ${n}\n\n`)}):e.report({loc:{start:{line:0,column:0},end:{line:0,column:1}},message:"first line is not a comment with the file path",fix:e=>e.insertTextBeforeRange([0,0],`// ${n}\n\n`)});return{}}},"no-card-numbers":{meta:{type:"problem",docs:{description:"Detects if a luhn passing card number",url:"https://github.com/checkdigit/eslint-plugin"},messages:{CARD_NUMBER_FOUND:'Valid card number: "{{ number }}"',CARD_NUMBERS_FOUND:'Multiple valid card numbers found: "{{ numbers }}"'}},create:e=>(e.getSourceCode().getAllComments().forEach((t=>{void 0!==t.loc&&null!==t.loc&&n(t.value,e,void 0,t.loc)})),{Literal(t){if(void 0===t.value)return;if("string"!=typeof t.value&&"number"!=typeof t.value)return;n(`${t.value}`,e,t)},TemplateElement(t){t.value&&"string"==typeof t.value.cooked&&n(t.value.cooked,e,t)}})},"no-uuid":{meta:{type:"problem",docs:{description:"Detects if a string literal contains a UUID",url:"https://github.com/checkdigit/eslint-plugin"},messages:{UUID_FOUND:'UUID found: "{{ uuid }}"',UUIDS_FOUND:'Multiple UUIDs found: "{{ uuids }}"'}},create:e=>(e.getSourceCode().getAllComments().forEach((t=>{void 0!==t.loc&&null!==t.loc&&i(t.value,e,void 0,t.loc)})),{Literal(t){if(void 0===t.value)return;if("string"!=typeof t.value)return;i(`${t.value}`,e,t)},TemplateElement(t){t.value&&"string"==typeof t.value.cooked&&i(t.value.cooked,e,t)}})}},configs:{all:{rules:{"@checkdigit/no-card-numbers":"error","@checkdigit/file-path-comment":"error","@checkdigit/no-uuid":"error"}},recommended:{rules:{"@checkdigit/no-card-numbers":"error","@checkdigit/file-path-comment":"off","@checkdigit/no-uuid":"error"}}}};module.exports=r;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/no-card-numbers.ts","../src/index.ts","../src/file-path-comment.ts"],"sourcesContent":[null,null,null],"names":["cardNumberRegex","allowCardNumbers","checkForCardNumbers","value","context","node","loc","matches","match","cardNumbers","filter","split","reverse","map","digit","parseInt","reduce","previousValue","currentValue","index","indexOf","length","undefined","report","messageId","data","number","start","end","join","rules","meta","type","docs","description","url","fixable","create","firstLine","getSourceCode","getLines","expectedPath","getFilename","startsWith","actualComment","line","column","message","fix","fixer","replaceTextRange","insertTextBeforeRange","messages","CARD_NUMBER_FOUND","CARD_NUMBERS_FOUND","getAllComments","forEach","comment","Literal","TemplateElement","cooked","configs","all","recommended"],"mappings":"aAWA,MAEMA,EAAkB,eAClBC,EAAmB,CACvB,mBACA,kBACA,kBACA,mBACA,oBACA,qBACA,uBAyBF,SAASC,EAAoBC,EAAeC,EAA2BC,EAAaC,GAClF,MAAMC,EAAUJ,EAAMK,MAAMR,GAC5B,GAAgB,OAAZO,EACF,OAEF,MAAME,EAAcF,EAAQG,QAAQF,GAAoBA,EAxBnDG,MAAM,IACNC,UACAC,KAAKC,GAAUC,SAASD,EAAO,MAC/BE,QAAO,CAACC,EAAeC,EAAcC,KACpC,IAAIhB,EAAQe,EAQZ,OAPIC,EAAQ,GAAM,IAChBhB,GAAS,EAELA,EAAQ,IACVA,EAASA,EAAQ,GAAM,IAGpBc,EAAgBd,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/no-card-numbers.ts","../src/no-uuid.ts","../src/index.ts","../src/file-path-comment.ts"],"sourcesContent":[null,null,null,null],"names":["cardNumberRegex","allowCardNumbers","checkForCardNumbers","value","context","node","loc","matches","match","cardNumbers","filter","split","reverse","map","digit","parseInt","reduce","previousValue","currentValue","index","indexOf","length","undefined","report","messageId","data","number","start","end","numbers","join","uuidRegex","checkForUuid","uuid","uuids","rules","meta","type","docs","description","url","fixable","create","firstLine","getSourceCode","getLines","expectedPath","getFilename","startsWith","actualComment","line","column","message","fix","fixer","replaceTextRange","insertTextBeforeRange","messages","CARD_NUMBER_FOUND","CARD_NUMBERS_FOUND","getAllComments","forEach","comment","Literal","TemplateElement","cooked","UUID_FOUND","UUIDS_FOUND","configs","all","recommended"],"mappings":"aAWA,MAEMA,EAAkB,eAClBC,EAAmB,CACvB,mBACA,kBACA,kBACA,mBACA,oBACA,qBACA,uBAyBF,SAASC,EAAoBC,EAAeC,EAA2BC,EAAaC,GAClF,MAAMC,EAAUJ,EAAMK,MAAMR,GAC5B,GAAgB,OAAZO,EACF,OAEF,MAAME,EAAcF,EAAQG,QAAQF,GAAoBA,EAxBnDG,MAAM,IACNC,UACAC,KAAKC,GAAUC,SAASD,EAAO,MAC/BE,QAAO,CAACC,EAAeC,EAAcC,KACpC,IAAIhB,EAAQe,EA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|
2
2
|
"name": "@checkdigit/eslint-plugin",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "Check Digit eslint plugins",
|
|
5
5
|
"prettier": "@checkdigit/prettier-config",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -8,14 +8,6 @@
|
|
|
8
8
|
"eslint",
|
|
9
9
|
"eslintplugin"
|
|
10
10
|
],
|
|
11
|
-
"scripts": {
|
|
12
|
-
"preversion": "npm test",
|
|
13
|
-
"postversion": "git push && git push --tags",
|
|
14
|
-
"test": "tsc --noEmit && jest && npm run prettier && npm run lint",
|
|
15
|
-
"lint": "eslint -f unix --ext .ts src/**",
|
|
16
|
-
"prettier": "prettier --list-different 'src/**/*.ts'",
|
|
17
|
-
"prettier:fix": "prettier --write 'src/**/*.ts'"
|
|
18
|
-
},
|
|
19
11
|
"engines": {
|
|
20
12
|
"node": ">=16"
|
|
21
13
|
},
|
|
@@ -33,39 +25,35 @@
|
|
|
33
25
|
"eslint": ">=8"
|
|
34
26
|
},
|
|
35
27
|
"devDependencies": {
|
|
36
|
-
"@checkdigit/
|
|
37
|
-
"@checkdigit/
|
|
38
|
-
"@
|
|
39
|
-
"@types/
|
|
40
|
-
"@
|
|
41
|
-
"@typescript-eslint/
|
|
42
|
-
"@typescript-eslint/parser": "^5.27.0",
|
|
28
|
+
"@checkdigit/jest-config": "^2.0.0",
|
|
29
|
+
"@checkdigit/prettier-config": "^3.0.0",
|
|
30
|
+
"@checkdigit/typescript-config": "^3.1.0",
|
|
31
|
+
"@types/eslint": "^8.4.6",
|
|
32
|
+
"@typescript-eslint/eslint-plugin": "^5.39.0",
|
|
33
|
+
"@typescript-eslint/parser": "^5.39.0",
|
|
43
34
|
"eslint-config-prettier": "^8.5.0",
|
|
44
35
|
"eslint-plugin-deprecate": "^0.7.0",
|
|
45
|
-
"eslint-plugin-eslint-plugin": "^
|
|
36
|
+
"eslint-plugin-eslint-plugin": "^5.0.6",
|
|
46
37
|
"eslint-plugin-import": "^2.26.0",
|
|
47
|
-
"eslint-plugin-no-only-tests": "^
|
|
38
|
+
"eslint-plugin-no-only-tests": "^3.0.0",
|
|
48
39
|
"eslint-plugin-no-secrets": "^0.8.9",
|
|
49
40
|
"eslint-plugin-node": "^11.1.0",
|
|
50
|
-
"eslint-plugin-sonarjs": "^0.
|
|
51
|
-
|
|
41
|
+
"eslint-plugin-sonarjs": "^0.15.0"
|
|
42
|
+
},
|
|
43
|
+
"scripts": {
|
|
44
|
+
"postversion": "git push && git push --tags",
|
|
45
|
+
"lint:fix": "eslint -f unix --ext .ts src --fix",
|
|
46
|
+
"lint": "eslint -f unix --ext .ts src",
|
|
47
|
+
"prettier": "prettier --ignore-path .gitignore --list-different .",
|
|
48
|
+
"prettier:fix": "prettier --ignore-path .gitignore --write .",
|
|
49
|
+
"test": "npm run ci:compile && npm run ci:test && npm run ci:lint && npm run ci:style",
|
|
50
|
+
"ci:compile": "tsc --noEmit",
|
|
51
|
+
"ci:test": "jest --coverage=false",
|
|
52
|
+
"ci:coverage": "jest --coverage=true",
|
|
53
|
+
"ci:lint": "npm run lint",
|
|
54
|
+
"ci:style": "npm run prettier"
|
|
52
55
|
},
|
|
53
56
|
"jest": {
|
|
54
|
-
"
|
|
55
|
-
"preset": "ts-jest",
|
|
56
|
-
"testMatch": [
|
|
57
|
-
"<rootDir>/src/**/?(*.)spec.ts"
|
|
58
|
-
],
|
|
59
|
-
"testPathIgnorePatterns": [
|
|
60
|
-
"<rootDir>/build",
|
|
61
|
-
"<rootDir>/coverage",
|
|
62
|
-
"<rootDir>/node_modules"
|
|
63
|
-
],
|
|
64
|
-
"globals": {
|
|
65
|
-
"ts-jest": {
|
|
66
|
-
"isolatedModules": true,
|
|
67
|
-
"diagnostics": false
|
|
68
|
-
}
|
|
69
|
-
}
|
|
57
|
+
"preset": "@checkdigit/jest-config"
|
|
70
58
|
}
|
|
71
59
|
}
|