Skip to content

Commit 983f80b

Browse files
Move Rules Library to TypeScript
Move Rules Library to TypeScript
2 parents 807481f + 0eb92af commit 983f80b

18 files changed

Lines changed: 7254 additions & 10476 deletions

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
dist/
2+
jest.*

.eslintrc.json

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
{
2-
"extends": [
3-
"airbnb-base",
4-
"prettier"
5-
],
6-
"plugins": [
7-
"prettier"
8-
],
2+
"parser": "@typescript-eslint/parser",
3+
"extends": ["airbnb-base", "airbnb-typescript/base", "prettier"],
4+
"plugins": ["@typescript-eslint", "prettier"],
95
"rules": {
106
"prettier/prettier": "error",
11-
"import/extensions": "off"
7+
"no-restricted-syntax": ["error"],
8+
"import/extensions": "off",
9+
"import/prefer-default-export": "off"
1210
},
1311
"env": {
1412
"node": true,
1513
"jest": true
14+
},
15+
"parserOptions": {
16+
"ecmaVersion": 2022,
17+
"project": "./tsconfig.eslint.json"
1618
}
1719
}
20+

.github/workflows/lint-test-build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
- uses: actions/checkout@v2
1010
- uses: actions/setup-node@v1
1111
with:
12-
node-version: 14
12+
node-version: 18
1313
- run: npm ci
1414
- run: npm run lint
1515

@@ -19,7 +19,7 @@ jobs:
1919
- uses: actions/checkout@v2
2020
- uses: actions/setup-node@v1
2121
with:
22-
node-version: 14
22+
node-version: 18
2323
- run: npm ci
2424
- run: npm test
2525

@@ -29,6 +29,6 @@ jobs:
2929
- uses: actions/checkout@v2
3030
- uses: actions/setup-node@v1
3131
with:
32-
node-version: 14
32+
node-version: 18
3333
- run: npm ci
3434
- run: npm run build

.github/workflows/npmpublish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
- uses: actions/checkout@v2
1212
- uses: actions/setup-node@v1
1313
with:
14-
node-version: 14
14+
node-version: 18
1515
registry-url: https://registry.npmjs.org/
1616
- run: npm ci
1717
- run: npm publish --access public

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
node_modules/
22
coverage/
33
dist/
4+
.env
5+
.npmrc

jest.config.js

Lines changed: 0 additions & 188 deletions
This file was deleted.

jest.config.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
export default {
2+
preset: "ts-jest",
3+
testEnvironment: "node",
4+
coverageProvider: "v8",
5+
clearMocks: true,
6+
setupFiles: [],
7+
collectCoverageFrom: [
8+
"src/**/*.{js,jsx,ts,tsx}",
9+
"!<rootDir>/node_modules/",
10+
"!<rootDir>/dist/",
11+
"!src/**/types.ts",
12+
],
13+
coverageThreshold: {
14+
global: {
15+
branches: 100,
16+
functions: 100,
17+
lines: 100,
18+
statements: 100,
19+
},
20+
},
21+
transform: {},
22+
};

0 commit comments

Comments
 (0)