tidepool 1.0.1 → 1.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/.github/workflows/eslint.yml +50 -0
- package/eslint.config.mjs +38 -0
- package/package.json +10 -3
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# This workflow uses actions that are not certified by GitHub.
|
|
2
|
+
# They are provided by a third-party and are governed by
|
|
3
|
+
# separate terms of service, privacy policy, and support
|
|
4
|
+
# documentation.
|
|
5
|
+
# ESLint is a tool for identifying and reporting on patterns
|
|
6
|
+
# found in ECMAScript/JavaScript code.
|
|
7
|
+
# More details at https://github.com/eslint/eslint
|
|
8
|
+
# and https://eslint.org
|
|
9
|
+
|
|
10
|
+
name: ESLint
|
|
11
|
+
|
|
12
|
+
on:
|
|
13
|
+
push:
|
|
14
|
+
branches: [ "main" ]
|
|
15
|
+
pull_request:
|
|
16
|
+
# The branches below must be a subset of the branches above
|
|
17
|
+
branches: [ "main" ]
|
|
18
|
+
schedule:
|
|
19
|
+
- cron: '21 0 * * 3'
|
|
20
|
+
|
|
21
|
+
jobs:
|
|
22
|
+
eslint:
|
|
23
|
+
name: Run eslint scanning
|
|
24
|
+
runs-on: ubuntu-latest
|
|
25
|
+
permissions:
|
|
26
|
+
contents: read
|
|
27
|
+
security-events: write
|
|
28
|
+
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
|
29
|
+
steps:
|
|
30
|
+
- name: Checkout code
|
|
31
|
+
uses: actions/checkout@v4
|
|
32
|
+
|
|
33
|
+
- name: Install ESLint
|
|
34
|
+
run: |
|
|
35
|
+
npm install eslint@8.10.0
|
|
36
|
+
npm install @microsoft/eslint-formatter-sarif@2.1.7
|
|
37
|
+
|
|
38
|
+
- name: Run ESLint
|
|
39
|
+
run: npx eslint .
|
|
40
|
+
--config .eslintrc.js
|
|
41
|
+
--ext .js,.jsx,.ts,.tsx
|
|
42
|
+
--format @microsoft/eslint-formatter-sarif
|
|
43
|
+
--output-file eslint-results.sarif
|
|
44
|
+
continue-on-error: true
|
|
45
|
+
|
|
46
|
+
- name: Upload analysis results to GitHub
|
|
47
|
+
uses: github/codeql-action/upload-sarif@v3
|
|
48
|
+
with:
|
|
49
|
+
sarif_file: eslint-results.sarif
|
|
50
|
+
wait-for-processing: true
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import typescriptEslint from "@typescript-eslint/eslint-plugin";
|
|
2
|
+
import globals from "globals";
|
|
3
|
+
import tsParser from "@typescript-eslint/parser";
|
|
4
|
+
import path from "node:path";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
6
|
+
import js from "@eslint/js";
|
|
7
|
+
import { FlatCompat } from "@eslint/eslintrc";
|
|
8
|
+
|
|
9
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
10
|
+
const __dirname = path.dirname(__filename);
|
|
11
|
+
const compat = new FlatCompat({
|
|
12
|
+
baseDirectory: __dirname,
|
|
13
|
+
recommendedConfig: js.configs.recommended,
|
|
14
|
+
allConfig: js.configs.all
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export default [
|
|
18
|
+
...compat.extends("eslint:recommended", "plugin:@typescript-eslint/recommended"),
|
|
19
|
+
{
|
|
20
|
+
plugins: {
|
|
21
|
+
"@typescript-eslint": typescriptEslint,
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
languageOptions: {
|
|
25
|
+
globals: {
|
|
26
|
+
...globals.node,
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
parser: tsParser,
|
|
30
|
+
ecmaVersion: 12,
|
|
31
|
+
sourceType: "module",
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
rules: {
|
|
35
|
+
"@typescript-eslint/no-unsafe-function-type": "off",
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
];
|
package/package.json
CHANGED
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tidepool",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"author": "stuncs69",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"devDependencies": {
|
|
7
|
+
"@eslint/js": "^9.9.0",
|
|
7
8
|
"@types/node": "^22.2.0",
|
|
8
|
-
"typescript": "^
|
|
9
|
+
"@typescript-eslint/eslint-plugin": "^8.1.0",
|
|
10
|
+
"@typescript-eslint/parser": "^8.1.0",
|
|
11
|
+
"eslint": "^9.9.0",
|
|
12
|
+
"globals": "^15.9.0",
|
|
13
|
+
"typescript": "^5.5.4",
|
|
14
|
+
"typescript-eslint": "^8.1.0"
|
|
9
15
|
},
|
|
10
16
|
"description": "A CLI rendering engine in TypeScript.",
|
|
11
17
|
"license": "ISC",
|
|
12
18
|
"scripts": {
|
|
13
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
19
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
20
|
+
"lint": "eslint ./src/*"
|
|
14
21
|
}
|
|
15
22
|
}
|