Navigation Menu

Skip to content

Commit

Permalink
feat: upgrade to napi2
Browse files Browse the repository at this point in the history
  • Loading branch information
Brooooooklyn committed Dec 18, 2021
1 parent 31c1944 commit e6cc543
Show file tree
Hide file tree
Showing 42 changed files with 1,406 additions and 1,244 deletions.
26 changes: 6 additions & 20 deletions .eslintrc.yml
Expand Up @@ -3,8 +3,10 @@ parser: '@typescript-eslint/parser'
parserOptions:
ecmaFeatures:
jsx: true
ecmaVersion: 2020
ecmaVersion: latest
sourceType: module
project: ./tsconfig.json
extraFileExtensions: ['.mjs']

env:
browser: true
Expand All @@ -14,11 +16,10 @@ env:

plugins:
- import
- sonarjs
- '@typescript-eslint'

extends:
- eslint:recommended
- plugin:sonarjs/recommended
- plugin:prettier/recommended

rules:
Expand Down Expand Up @@ -60,35 +61,20 @@ rules:
},
]

'sonarjs/cognitive-complexity': 0
'sonarjs/no-duplicate-string': 0
'sonarjs/no-big-function': 0
'sonarjs/no-identical-functions': 0
'sonarjs/no-small-switch': 0

overrides:
- files:
- ./**/*.{ts,tsx}
rules:
'no-unused-vars': [2, { varsIgnorePattern: '^_', argsIgnorePattern: '^_', ignoreRestSiblings: true }]

- files:
- ./**/*{.ts,.tsx}
plugins:
- '@typescript-eslint'
parserOptions:
project: ./tsconfig.json
- ./**/*{.ts,.tsx,.mjs}
rules:
'no-undef': 0
# TypeScript declare merge
'no-redeclare': 0
'no-useless-constructor': 0
'no-unused-vars': 0
'no-dupe-class-members': 0
'no-case-declarations': 0
'no-duplicate-imports': 0
# TypeScript Interface and Type
'no-use-before-define': 0
'no-unused-vars': [2, { varsIgnorePattern: '^_', argsIgnorePattern: '^_', ignoreRestSiblings: true }]

'@typescript-eslint/adjacent-overload-signatures': 2
'@typescript-eslint/await-thenable': 2
Expand Down
14 changes: 14 additions & 0 deletions .gitattributes
@@ -0,0 +1,14 @@
# Auto detect text files and perform LF normalization
* text=auto


*.ts text eol=lf merge=union
*.tsx text eol=lf merge=union
*.rs text eol=lf merge=union
*.js text eol=lf merge=union
*.json text eol=lf merge=union
*.debug text eol=lf merge=union

# Generated codes
index.js linguist-detectable=false
index.d.ts linguist-detectable=false

0 comments on commit e6cc543

Please sign in to comment.