Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try again #95

Open
wants to merge 3 commits into
base: napi-1-pre
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .cargo/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[target.aarch64-unknown-linux-gnu]
linker = "aarch64-linux-gnu-gcc"
86 changes: 83 additions & 3 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,19 @@ rules:
},
]

# https://github.com/benmosher/eslint-plugin-import/pull/334
'import/no-duplicates': 2
'import/first': 2
'import/newline-after-import': 2
'import/order':
[
2,
{
'newlines-between': 'always',
'alphabetize': { 'order': 'asc' },
'groups': ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'],
},
]

'sonarjs/cognitive-complexity': 0
'sonarjs/no-duplicate-string': 0
Expand All @@ -68,12 +79,81 @@ overrides:
parserOptions:
project: ./tsconfig.json
rules:
# eslint will treat TS type as undefined stuff
'no-undef': 0

# conflict function override
# 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

'@typescript-eslint/adjacent-overload-signatures': 2
'@typescript-eslint/await-thenable': 2
'@typescript-eslint/consistent-type-assertions': 2
'@typescript-eslint/ban-types':
[
'error',
{
'types':
{
'String': { 'message': 'Use string instead', 'fixWith': 'string' },
'Number': { 'message': 'Use number instead', 'fixWith': 'number' },
'Boolean': { 'message': 'Use boolean instead', 'fixWith': 'boolean' },
'Function': { 'message': 'Use explicit type instead' },
},
},
]
'@typescript-eslint/explicit-member-accessibility':
[
'error',
{
accessibility: 'explicit',
overrides:
{
accessors: 'no-public',
constructors: 'no-public',
methods: 'no-public',
properties: 'no-public',
parameterProperties: 'explicit',
},
},
]
'@typescript-eslint/method-signature-style': 2
'@typescript-eslint/no-floating-promises': 2
'@typescript-eslint/no-implied-eval': 2
'@typescript-eslint/no-for-in-array': 2
'@typescript-eslint/no-inferrable-types': 2
'@typescript-eslint/no-invalid-void-type': 2
'@typescript-eslint/no-misused-new': 2
'@typescript-eslint/no-misused-promises': 2
'@typescript-eslint/no-namespace': 2
'@typescript-eslint/no-non-null-asserted-optional-chain': 2
'@typescript-eslint/no-throw-literal': 2
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 2
'@typescript-eslint/prefer-for-of': 2
'@typescript-eslint/prefer-nullish-coalescing': 2
'@typescript-eslint/switch-exhaustiveness-check': 2
'@typescript-eslint/prefer-optional-chain': 2
'@typescript-eslint/prefer-readonly': 2
'@typescript-eslint/prefer-string-starts-ends-with': 0
'@typescript-eslint/no-array-constructor': 2
'@typescript-eslint/require-await': 2
'@typescript-eslint/return-await': 2
'@typescript-eslint/ban-ts-comment':
[2, { 'ts-expect-error': false, 'ts-ignore': true, 'ts-nocheck': true, 'ts-check': false }]
'@typescript-eslint/naming-convention':
[
2,
{
selector: 'memberLike',
format: ['camelCase', 'PascalCase'],
modifiers: ['private'],
leadingUnderscore: 'forbid',
},
]
'@typescript-eslint/no-unused-vars':
[2, { varsIgnorePattern: '^_', argsIgnorePattern: '^_', ignoreRestSiblings: true }]
'@typescript-eslint/member-ordering':
Expand Down
Loading