Skip to content

Commit 8c4223a

Browse files
committed
Partial TypeScript refactoring
1 parent 153a559 commit 8c4223a

File tree

112 files changed

+4023
-3937
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+4023
-3937
lines changed

.eslintignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ test/MethodParser.spec.js
22
test/issues.spec.js
33
test/examples
44
test/tutorial
5-
jest.config.js
65
sample.js
6+
esm/

.eslintrc.yaml

+26-6
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,32 @@
22
root: true
33
env:
44
node: true
5+
parser: '@typescript-eslint/parser'
6+
plugins:
7+
- import
8+
- '@typescript-eslint'
59
extends:
610
- eslint:recommended
711
- airbnb-base
812
- plugin:import/recommended
13+
- plugin:import/typescript
14+
- plugin:@typescript-eslint/recommended
15+
- plugin:security/recommended
916
parserOptions:
10-
ecmaVersion: 13
17+
ecmaVersion: 2019
1118
sourceType: module
1219
rules:
20+
'@typescript-eslint/ban-types': 'off'
21+
'@typescript-eslint/indent': 'off'
22+
'@typescript-eslint/explicit-function-return-type': 'off'
23+
'@typescript-eslint/explicit-member-accessibility': 'off'
24+
'@typescript-eslint/interface-name-prefix': 'off'
25+
'@typescript-eslint/no-empty-function': 'off'
26+
'@typescript-eslint/no-explicit-any': 'off'
27+
'@typescript-eslint/no-empty-interface': 'off'
28+
'@typescript-eslint/no-this-alias': 'off'
29+
'@typescript-eslint/no-unused-vars': 'off'
30+
'@typescript-eslint/no-var-requires': 'off'
1331
arrow-body-style: 'off'
1432
array-bracket-spacing:
1533
- error
@@ -25,9 +43,6 @@ rules:
2543
imports: never
2644
exports: never
2745
functions: never
28-
complexity:
29-
- error
30-
- max: 40
3146
class-methods-use-this: 'off'
3247
default-case: 'off'
3348
global-require: 'off'
@@ -44,7 +59,7 @@ rules:
4459
import/no-named-as-default: 'off'
4560
import/no-named-as-default-member: 'off'
4661
import/no-unresolved:
47-
- 'error'
62+
- 'off'
4863
import/order: 'off'
4964
import/prefer-default-export: 'off'
5065
jest/expect-expect: 'off'
@@ -62,12 +77,13 @@ rules:
6277
no-use-before-define: 'off'
6378
no-restricted-syntax: 'off'
6479
no-shadow: 'off'
80+
no-trailing-spaces: 'error'
6581
no-useless-constructor: 'off'
6682
no-var: error
6783
max-classes-per-file: 'off'
6884
max-len:
6985
- error
70-
- code: 128
86+
- code: 148
7187
comments: 128
7288
tabWidth: 2
7389
ignoreUrls: true
@@ -127,6 +143,10 @@ rules:
127143
- error
128144
- single
129145
- avoidEscape: true
146+
security/detect-non-literal-fs-filename: 'off'
147+
security/detect-non-literal-regexp: 'off'
148+
security/detect-object-injection: 'off'
149+
security/detect-unsafe-regex: 'off'
130150
semi:
131151
- error
132152
- always

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,5 @@ jspm_packages
5454
*.odp
5555
*.pdf
5656
*.png
57+
esm/
58+
sample.js

.gitlab-ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ tests & coverage:
2525
stage: tests
2626
script:
2727
- yarn install
28-
- yarn test
28+
- yarn coverage
2929
coverage: '/All files[^|]*\|[^|]*\s+([\d\.]+)/'
3030
artifacts:
3131
paths:

.npmignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
src
12
test
23
coverage
34
.*
45
sample.js
5-
jest.config.js
6+
vitest.ts
67
result.json
8+
tsconfig.json
79
*.tgz
810
*.nix
911
*.yml

index.d.ts

-61
This file was deleted.

jest.config.js

-21
This file was deleted.

lib/Loader.d.ts

-46
This file was deleted.

lib/Loader.js

-52
This file was deleted.

lib/entity/AbstractCategorizeEntry.js

-12
This file was deleted.

lib/entity/AbstractCategorizeTypeEntry.js

-10
This file was deleted.

lib/entity/AbstractDecorativeEntry.js

-10
This file was deleted.

lib/entity/AbstractEntry.js

-5
This file was deleted.

lib/entity/AbstractLiteralEntry.js

-9
This file was deleted.

lib/entity/ComputedEntry.js

-11
This file was deleted.

lib/entity/DataEntry.js

-10
This file was deleted.

lib/entity/DescriptionEntry.js

-7
This file was deleted.

0 commit comments

Comments
 (0)