-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add prettier and revalidating functions with better tests
- Loading branch information
1 parent
7f54b6d
commit bc24ede
Showing
39 changed files
with
1,372 additions
and
1,181 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,49 @@ | ||
/* eslint-env node */ | ||
module.exports = { | ||
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'], | ||
parser: '@typescript-eslint/parser', | ||
plugins: ['@typescript-eslint'], | ||
root: true, | ||
rules: { | ||
semi: ['error', 'always'], | ||
quotes: ['error', 'single'], | ||
} | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/strict-type-checked', | ||
'plugin:prettier/recommended', | ||
], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
project: true, | ||
tsconfigRootDir: __dirname, | ||
}, | ||
plugins: ['@typescript-eslint'], | ||
root: true, | ||
rules: { | ||
'no-else-return': ['error', { allowElseIf: false }], | ||
'consistent-return': 'error', | ||
'no-console': ['warn', { allow: ['warn', 'error'] }], // Here you are allowing console.warn and console.error | ||
'@typescript-eslint/typedef': [ | ||
'error', | ||
{ | ||
variableDeclaration: true, | ||
memberVariableDeclaration: true, | ||
}, | ||
], | ||
'@typescript-eslint/explicit-module-boundary-types': 'error', | ||
'@typescript-eslint/naming-convention': [ | ||
'error', | ||
{ | ||
selector: 'class', | ||
format: ['PascalCase'], | ||
}, | ||
], | ||
'@typescript-eslint/prefer-readonly': 'error', | ||
'@typescript-eslint/explicit-member-accessibility': [ | ||
'error', | ||
{ | ||
accessibility: 'explicit', | ||
overrides: { | ||
accessors: 'explicit', | ||
constructors: 'no-public', | ||
methods: 'explicit', | ||
properties: 'explicit', | ||
parameterProperties: 'explicit', | ||
}, | ||
}, | ||
], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
dist | ||
node_modules | ||
coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
semi: true, | ||
trailingComma: 'all', | ||
singleQuote: true, | ||
printWidth: 100, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.