-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor!: es modules and commonjs build
BREAKING CHANGE: changed file structure
- Loading branch information
1 parent
6d6575a
commit 098b331
Showing
238 changed files
with
20,568 additions
and
27,064 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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/.idea | ||
/!.idea/runConfigurations | ||
/.base-frame-tmp | ||
/coverage | ||
/dist | ||
/node_modules | ||
/packages | ||
/test/node_modules | ||
/test/dist | ||
*.tsbuildinfo |
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,2 +1,26 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = tab | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
max_line_length = 130 | ||
indent_size = 2 | ||
insert_final_newline = true | ||
tab_width = 2 | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[{*.ts, *.js}] | ||
ij_typescript_import_prefer_absolute_path = false | ||
ij_visual_guides = 130 | ||
ij_javascript_force_semicolon_style = false | ||
ij_typescript_import_prefer_absolute_path = true | ||
ij_typescript_use_path_mapping = always | ||
ij_typescript_force_semicolon_style = false | ||
ij_typescript_force_quote_style = true | ||
ij_typescript_enforce_trailing_comma = whenmultiline | ||
ij_typescript_use_double_quotes = false | ||
ij_typescript_use_semicolon_after_statement = false | ||
ij_typescript_spaces_within_imports = true |
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,9 +1,14 @@ | ||
.base-frame-tmp | ||
.idea | ||
.nyc_output | ||
.semaphore | ||
coverage | ||
lib | ||
node_modules | ||
resource | ||
unit.test.js | ||
/.base-frame-tmp | ||
/.idea | ||
/.semaphore | ||
/coverage | ||
/dist | ||
/node_modules | ||
/resource | ||
/packages | ||
.*.js | ||
.*.json | ||
package-lock.json | ||
tsconfig*.json | ||
typedoc.json | ||
/jest*.config.js |
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,145 @@ | ||
const namingConvention = () => { | ||
// prettier-ignore | ||
return [ | ||
{ selector: ['default'], format: null, modifiers: ['public'], leadingUnderscore: 'forbid' }, | ||
{ selector: ['default'], format: ['camelCase'], modifiers: ['protected'], leadingUnderscore: 'require' }, | ||
{ selector: ['default'], format: ['camelCase'], modifiers: ['private'], prefix: ['__'] }, | ||
{ selector: ['accessor'], format: ['camelCase'], modifiers: ['public'], leadingUnderscore: 'forbid' }, | ||
{ selector: ['accessor'], format: ['camelCase'], modifiers: ['protected'], leadingUnderscore: 'require' }, | ||
{ selector: ['accessor'], format: ['camelCase'], modifiers: ['private'], prefix: ['__'] }, | ||
{ selector: ['enum'], format: ['PascalCase'] }, | ||
{ selector: ['enumMember'], format: ['UPPER_CASE'] }, | ||
{ selector: ['classMethod', 'accessor'], format: ['PascalCase'], modifiers: ['public', 'static'] }, | ||
{ selector: ['classProperty'], format: ['UPPER_CASE'], modifiers: ['public', 'static'] }, | ||
|
||
] | ||
} | ||
|
||
module.exports = { | ||
root: true, | ||
env: { | ||
es6: true, | ||
'jest/globals': true, | ||
node: true, | ||
}, | ||
settings: { | ||
'import/resolver': { | ||
node: { | ||
paths: ['./'], | ||
}, | ||
}, | ||
}, | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/eslint-recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:@typescript-eslint/strict', | ||
'plugin:import/errors', | ||
'plugin:import/warnings', | ||
'plugin:import/typescript', | ||
'plugin:prettier/recommended', | ||
], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
ecmaVersion: 'ESNext', | ||
project: './tsconfig.eslint.json', | ||
sourceType: 'module', | ||
}, | ||
plugins: ['@typescript-eslint', 'eslint-plugin-import', 'import', 'no-only-tests', 'no-loops', 'jest', 'sort-keys-fix'], | ||
rules: { | ||
// TODO TEMP DISABLE | ||
'@typescript-eslint/no-explicit-any':'warn', | ||
// ESLINT | ||
// 'no-restricted-imports': [ | ||
// 'error', | ||
// { | ||
// patterns: [ | ||
// { | ||
// group: ['**/index'], | ||
// message: 'Please use `.../something` instead of ``.../something/index`', | ||
// }, | ||
// ], | ||
// }, | ||
// ], | ||
|
||
'prefer-arrow-callback': 'error', | ||
'no-confusing-arrow': 'error', | ||
'no-constant-condition': 'error', | ||
|
||
'no-ternary': 'warn', // TODO temp warn, revert to error | ||
'@typescript-eslint/no-var-requires': 'warn', // TODO temp warn, remove and use default value | ||
|
||
'padding-line-between-statements': [ | ||
'error', | ||
{ blankLine: 'always', next: 'return', prev: '*' }, | ||
{ blankLine: 'always', next: ['cjs-export', 'export'], prev: '*' }, | ||
], | ||
'prefer-template': 'error', | ||
'sort-imports': [ | ||
'error', | ||
{ | ||
ignoreDeclarationSort: true, | ||
}, | ||
], | ||
|
||
// NO_LOOPS | ||
'no-loops/no-loops': 'error', | ||
|
||
// DISABLE STRICT | ||
'@typescript-eslint/consistent-type-definitions': 'off', | ||
'@typescript-eslint/dot-notation': 'off', | ||
'@typescript-eslint/explicit-function-return-type': ['error', { allowExpressions: true }], | ||
'@typescript-eslint/explicit-member-accessibility': ['error', { accessibility: 'no-public' }], | ||
'@typescript-eslint/naming-convention': ['warn', ...namingConvention()], // TODO temp warn, revert to error | ||
|
||
// TYPESCRIPT | ||
'@typescript-eslint/ban-ts-comment': ['warn', { 'ts-expect-error': 'allow-with-description' }], | ||
'@typescript-eslint/no-empty-interface': 'off', | ||
'@typescript-eslint/no-non-null-assertion': 'off', | ||
'@typescript-eslint/no-unused-vars': [ | ||
'warn', | ||
{ argsIgnorePattern: '^_', caughtErrorsIgnorePattern: '^_', destructuredArrayIgnorePattern: '^_', varsIgnorePattern: '^_' }, | ||
], | ||
|
||
// IMPORT | ||
'import/namespace': [ | ||
'error', | ||
{ | ||
allowComputed: true, | ||
}, | ||
], | ||
'import/newline-after-import': 'error', | ||
'import/no-unresolved': 'off', | ||
'import/order': [ | ||
'error', | ||
{ | ||
alphabetize: { | ||
caseInsensitive: false, | ||
order: 'asc', | ||
}, | ||
groups: [['index', 'sibling', 'parent', 'internal', 'external', 'builtin', 'object']], | ||
'newlines-between': 'always', | ||
}, | ||
], | ||
|
||
// JEST | ||
'jest/no-disabled-tests': 'warn', | ||
'jest/no-focused-tests': 'error', | ||
'jest/no-identical-title': 'error', | ||
'jest/prefer-to-have-length': 'warn', | ||
'jest/valid-expect': 'error', | ||
'no-console': 'error', | ||
'no-duplicate-imports': 'error', | ||
|
||
//NO_ONLY_TESTS | ||
'no-only-tests/no-only-tests': 'error', | ||
|
||
// SORT_KEYS_FIX | ||
'sort-keys-fix/sort-keys-fix': ['error', 'asc', { caseSensitive: false, natural: true }], | ||
|
||
// PRETTIER | ||
'lines-between-class-members': ['error', 'always', { exceptAfterSingleLine: true }], | ||
curly: 'error', | ||
'no-mixed-spaces-and-tabs': 'error', | ||
}, | ||
} |
This file was deleted.
Oops, something went wrong.
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,2 @@ | ||
[pull] | ||
rebase = true |
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,5 +1,10 @@ | ||
.base-frame-tmp | ||
.vscode | ||
.nyc_output | ||
coverage | ||
node_modules | ||
/.idea | ||
/!.idea/runConfigurations | ||
/.base-frame-tmp | ||
/coverage | ||
/dist | ||
/node_modules | ||
/packages | ||
/test/node_modules | ||
/test/dist | ||
*.tsbuildinfo |
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,4 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npm run lint | ||
npx lint-staged |
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 @@ | ||
{ | ||
"reject": [] | ||
} |
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 @@ | ||
v18.15.0 |
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,10 +1,8 @@ | ||
.base-frame-tmp | ||
.idea/ | ||
.nyc_output/ | ||
.semaphore/ | ||
coverage/ | ||
lib/ | ||
node_modules/ | ||
resource/ | ||
package.json | ||
/.idea | ||
/.semaphore | ||
/coverage | ||
/dist | ||
/node_modules | ||
/resource | ||
/packages | ||
package-lock.json |
Oops, something went wrong.