Skip to content

Commit

Permalink
style: Update
Browse files Browse the repository at this point in the history
  • Loading branch information
unlight committed May 6, 2022
1 parent 65e52b8 commit e4c115d
Show file tree
Hide file tree
Showing 567 changed files with 11,889 additions and 11,984 deletions.
14 changes: 7 additions & 7 deletions .commitlintrc.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'subject-case': [2, 'always', ['sentence-case']],
'scope-case': [2, 'always', ['lower-case', 'upper-case']],
'body-max-line-length': [1, 'never'],
'footer-max-line-length': [1, 'never'],
},
extends: ['@commitlint/config-conventional'],
rules: {
'subject-case': [2, 'always', ['sentence-case']],
'scope-case': [2, 'always', ['lower-case', 'upper-case']],
'body-max-line-length': [1, 'never'],
'footer-max-line-length': [1, 'never'],
},
};
130 changes: 65 additions & 65 deletions .cz-config.js
Original file line number Diff line number Diff line change
@@ -1,50 +1,50 @@
module.exports = {
types: [
{ value: 'feat', name: 'feat: A new feature' },
{ value: 'fix', name: 'fix: A bug fix' },
{ value: 'docs', name: 'docs: Documentation only changes' },
{
value: 'style',
name: 'style: Changes that do not affect the meaning of the code\n (white-space, formatting, missing semi-colons, etc)',
},
{
value: 'refactor',
name: 'refactor: A code change that neither fixes a bug nor adds a feature',
},
{
value: 'perf',
name: 'perf: A code change that improves performance',
},
{ value: 'test', name: 'test: Adding missing tests' },
{
value: 'ci',
name: 'ci: Changes related to continious integration',
},
{ value: 'build', name: 'build: Changes related to build process' },
{
value: 'chore',
name: 'chore: Changes to the build process or auxiliary tools\n and libraries such as documentation generation',
},
{ value: 'revert', name: 'revert: Revert to a commit' },
{ value: 'WIP', name: 'WIP: Work in progress' },
],
types: [
{ value: 'feat', name: 'feat: A new feature' },
{ value: 'fix', name: 'fix: A bug fix' },
{ value: 'docs', name: 'docs: Documentation only changes' },
{
value: 'style',
name: 'style: Changes that do not affect the meaning of the code\n (white-space, formatting, missing semi-colons, etc)',
},
{
value: 'refactor',
name: 'refactor: A code change that neither fixes a bug nor adds a feature',
},
{
value: 'perf',
name: 'perf: A code change that improves performance',
},
{ value: 'test', name: 'test: Adding missing tests' },
{
value: 'ci',
name: 'ci: Changes related to continious integration',
},
{ value: 'build', name: 'build: Changes related to build process' },
{
value: 'chore',
name: 'chore: Changes to the build process or auxiliary tools\n and libraries such as documentation generation',
},
{ value: 'revert', name: 'revert: Revert to a commit' },
{ value: 'WIP', name: 'WIP: Work in progress' },
],

scopes: [
{ name: 'hide field' },
{ name: 'configuration' },
{ name: 'custom decorators' },
{ name: 'compatibility' },
{ name: 'mongodb' },
{ name: 'other' },
],
scopes: [
{ name: 'hide field' },
{ name: 'configuration' },
{ name: 'custom decorators' },
{ name: 'compatibility' },
{ name: 'mongodb' },
{ name: 'other' },
],

allowTicketNumber: false,
isTicketNumberRequired: false,
ticketNumberPrefix: '#',
ticketNumberRegExp: '\\d{1,5}',
allowTicketNumber: false,
isTicketNumberRequired: false,
ticketNumberPrefix: '#',
ticketNumberRegExp: '\\d{1,5}',

// it needs to match the value for field type. Eg.: 'fix'
/*
// it needs to match the value for field type. Eg.: 'fix'
/*
scopeOverrides: {
fix: [
Expand All @@ -55,28 +55,28 @@ module.exports = {
]
},
*/
// override the messages, defaults are as follows
messages: {
type: "Select the type of change that you're committing:",
scope: '\nDenote the SCOPE of this change (optional):',
// used if allowCustomScopes is true
customScope: 'Denote the SCOPE of this change:',
subject: 'Write a SHORT, IMPERATIVE tense description of the change:\n',
body: 'Provide a LONGER description of the change (optional). Use "|" to break new line:\n',
breaking: 'List any BREAKING CHANGES (optional):\n',
footer: 'List any ISSUES CLOSED by this change (optional). E.g.: #31, #34:\n',
confirmCommit: 'Are you sure you want to proceed with the commit above?',
},
// override the messages, defaults are as follows
messages: {
type: "Select the type of change that you're committing:",
scope: '\nDenote the SCOPE of this change (optional):',
// used if allowCustomScopes is true
customScope: 'Denote the SCOPE of this change:',
subject: 'Write a SHORT, IMPERATIVE tense description of the change:\n',
body: 'Provide a LONGER description of the change (optional). Use "|" to break new line:\n',
breaking: 'List any BREAKING CHANGES (optional):\n',
footer: 'List any ISSUES CLOSED by this change (optional). E.g.: #31, #34:\n',
confirmCommit: 'Are you sure you want to proceed with the commit above?',
},

allowCustomScopes: true,
allowBreakingChanges: ['feat', 'fix', 'refactor', 'chore'],
// skip any questions you want
skipQuestions: ['body'],
allowCustomScopes: true,
allowBreakingChanges: ['feat', 'fix', 'refactor', 'chore'],
// skip any questions you want
skipQuestions: ['body'],

// limit subject length
subjectLimit: 100,
// breaklineChar: '|', // It is supported for fields body and footer.
footerPrefix: 'close:',
// askForBreakingChangeFirst : true, // default is false
upperCaseSubject: true,
// limit subject length
subjectLimit: 100,
// breaklineChar: '|', // It is supported for fields body and footer.
footerPrefix: 'close:',
// askForBreakingChangeFirst : true, // default is false
upperCaseSubject: true,
};
226 changes: 113 additions & 113 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,120 +1,120 @@
module.exports = {
root: true,
env: {
es6: true,
node: true,
browser: true,
root: true,
env: {
es6: true,
node: true,
browser: true,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:unicorn/recommended',
'plugin:import/warnings',
'plugin:regexp/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module',
ecmaFeatures: {
jsx: false,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:unicorn/recommended',
'plugin:import/warnings',
'plugin:regexp/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module',
ecmaFeatures: {
jsx: false,
warnOnUnsupportedTypeScriptVersion: false,
},
plugins: [
'unicorn',
'import',
'wix-editor',
'@typescript-eslint',
'prettier',
'simple-import-sort',
'sort-class-members',
'etc',
'only-warn',
],
rules: {
// core
'consistent-return': [0, { treatUndefinedAsUnspecified: false }],
quotes: [1, 'single', { allowTemplateLiterals: true, avoidEscape: true }],
semi: [1, 'always'],
'max-lines': [1, { max: 300 }],
'max-params': [1, { max: 5 }],
'no-unneeded-ternary': [1],
// wix-editor
'wix-editor/no-instanceof-array': 1,
'wix-editor/no-not-not': 1,
'wix-editor/no-unneeded-match': 1,
'wix-editor/prefer-filter': 1,
'wix-editor/prefer-ternary': 1,
'wix-editor/return-boolean': 1,
'wix-editor/simplify-boolean-expression': 1,
// unicorn
'unicorn/prefer-spread': 0,
'unicorn/catch-error-name': 0,
'unicorn/prefer-node-protocol': 0,
'unicorn/prevent-abbreviations': [
1,
{
replacements: {
args: false,
err: false,
prod: false,
ref: false,
params: false,
},
warnOnUnsupportedTypeScriptVersion: false,
},
plugins: [
'unicorn',
'import',
'wix-editor',
'@typescript-eslint',
'prettier',
'simple-import-sort',
'sort-class-members',
'etc',
'only-warn',
},
],
rules: {
// core
'consistent-return': [0, { treatUndefinedAsUnspecified: false }],
quotes: [1, 'single', { allowTemplateLiterals: true, avoidEscape: true }],
semi: [1, 'always'],
'max-lines': [1, { max: 300 }],
'max-params': [1, { max: 5 }],
'no-unneeded-ternary': [1],
// wix-editor
'wix-editor/no-instanceof-array': 1,
'wix-editor/no-not-not': 1,
'wix-editor/no-unneeded-match': 1,
'wix-editor/prefer-filter': 1,
'wix-editor/prefer-ternary': 1,
'wix-editor/return-boolean': 1,
'wix-editor/simplify-boolean-expression': 1,
// unicorn
'unicorn/prefer-spread': 0,
'unicorn/catch-error-name': 0,
'unicorn/prefer-node-protocol': 0,
'unicorn/prevent-abbreviations': [
1,
{
replacements: {
args: false,
err: false,
prod: false,
ref: false,
params: false,
},
},
],
// import
'import/max-dependencies': [1, { max: 15 }],
// simple-import-sort with recomended settings
'simple-import-sort/imports': 1,
'sort-imports': 'off',
'import/order': 'off',
// typescript-eslint
'@typescript-eslint/no-floating-promises': 1,
'@typescript-eslint/no-unnecessary-condition': 1,
'@typescript-eslint/explicit-module-boundary-types': 0,
'@typescript-eslint/unbound-method': 0,
// sort-class-members
'sort-class-members/sort-class-members': [
1,
{
order: [
'[static-properties]',
'[static-methods]',
'[properties]',
'[conventional-private-properties]',
'constructor',
'[methods]',
'[conventional-private-methods]',
],
accessorPairPositioning: 'getThenSet',
},
// import
'import/max-dependencies': [1, { max: 15 }],
// simple-import-sort with recomended settings
'simple-import-sort/imports': 1,
'sort-imports': 'off',
'import/order': 'off',
// typescript-eslint
'@typescript-eslint/no-floating-promises': 1,
'@typescript-eslint/no-unnecessary-condition': 1,
'@typescript-eslint/explicit-module-boundary-types': 0,
'@typescript-eslint/unbound-method': 0,
// sort-class-members
'sort-class-members/sort-class-members': [
1,
{
order: [
'[static-properties]',
'[static-methods]',
'[properties]',
'[conventional-private-properties]',
'constructor',
'[methods]',
'[conventional-private-methods]',
],
// etc
'etc/no-deprecated': 1,
'etc/no-assign-mutated-array': 1,
},
overrides: [
{
files: ['*.spec.ts', '**/{test,@generated}/**/*.ts'],
rules: {
'consistent-return': 0,
'max-lines': 0,
'regexp/strict': 0,
'@typescript-eslint/no-misused-promises': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-unsafe-member-access': 0,
'@typescript-eslint/no-floating-promises': 0,
'@typescript-eslint/no-non-null-assertion': 0,
'@typescript-eslint/camelcase': 0,
'@typescript-eslint/no-unsafe-assignment': 0,
'@typescript-eslint/no-unused-vars': 0,
'@typescript-eslint/no-unsafe-return': 0,
'@typescript-eslint/no-non-null-asserted-optional-chain': 0,
'import/max-dependencies': 0,
},
},
accessorPairPositioning: 'getThenSet',
},
],
// etc
'etc/no-deprecated': 1,
'etc/no-assign-mutated-array': 1,
},
overrides: [
{
files: ['*.spec.ts', '**/{test,@generated}/**/*.ts'],
rules: {
'consistent-return': 0,
'max-lines': 0,
'regexp/strict': 0,
'@typescript-eslint/no-misused-promises': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-unsafe-member-access': 0,
'@typescript-eslint/no-floating-promises': 0,
'@typescript-eslint/no-non-null-assertion': 0,
'@typescript-eslint/camelcase': 0,
'@typescript-eslint/no-unsafe-assignment': 0,
'@typescript-eslint/no-unused-vars': 0,
'@typescript-eslint/no-unsafe-return': 0,
'@typescript-eslint/no-non-null-asserted-optional-chain': 0,
'import/max-dependencies': 0,
},
},
],
};
Loading

0 comments on commit e4c115d

Please sign in to comment.