-
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.
build(node): update node version to 18 and update config of eslint
- Loading branch information
Showing
29 changed files
with
984 additions
and
390 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,42 +1,61 @@ | ||
const process = require('process'); | ||
const stylisticEsLint = require('@stylistic/eslint-plugin'); | ||
|
||
const customizedStylistJs = stylisticEsLint.configs.customize({ | ||
// the following options are the default values | ||
indent: 2, | ||
quotes: 'single', | ||
quoteProps: 'consistent', | ||
semi: true, | ||
jsx: true, | ||
braceStyle: '1tbs', | ||
}); | ||
|
||
const javascriptSettings = { | ||
files: ['*.js'], | ||
env: { | ||
'browser': true, | ||
'commonjs': true, | ||
'es2021': true | ||
'es2021': true, | ||
}, | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:jest/recommended', | ||
], | ||
parserOptions: { | ||
'ecmaVersion': 12 | ||
'ecmaVersion': 12, | ||
}, | ||
rules: { | ||
'indent': [ | ||
'error', | ||
2 | ||
2, | ||
], | ||
'linebreak-style': [ | ||
'error', | ||
process.platform === 'win32' ? 'windows' : 'unix' | ||
'unix', | ||
], | ||
'quotes': [ | ||
'error', | ||
'single' | ||
'single', | ||
], | ||
'no-else-return': ['error', {allowElseIf: false}], | ||
'no-else-return': ['error', { allowElseIf: false }], | ||
'no-unused-vars': ['error', { 'vars': 'all', 'args': 'after-used', 'ignoreRestSiblings': false }], | ||
'semi': [ | ||
'error', | ||
'always' | ||
] | ||
} | ||
'always', | ||
], | ||
}, | ||
}; | ||
|
||
module.exports = { | ||
plugins: ['jest'], | ||
plugins: [ | ||
'jest', | ||
'@stylistic', | ||
], | ||
rules: { | ||
...customizedStylistJs.rules, | ||
// ...your other rules | ||
}, | ||
overrides: [ | ||
javascriptSettings | ||
] | ||
}; | ||
javascriptSettings, | ||
], | ||
}; |
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,75 @@ | ||
############################################################################### | ||
# Set default behavior to automatically normalize line endings. | ||
############################################################################### | ||
* text=auto | ||
|
||
############################################################################### | ||
# Declare files that will always have CRLF line endings on checkout. | ||
############################################################################### | ||
*.sln text eol=crlf | ||
*.cs text eol=crlf | ||
*.resx text eol=crlf | ||
*.csproj text eol=crlf | ||
*.user text eol=crlf | ||
*.asset text eol=lf | ||
*.json test eol=lf | ||
*.js test eol=lf | ||
*.ts test eol=lf | ||
*.yml test eol=lf | ||
*.yaml test eol=lf | ||
*.vue test eol=lf | ||
*.golden test eol=lf | ||
*.mod test eol=lf | ||
*.sum test eol=lf | ||
|
||
############################################################################### | ||
# Set default behavior for command prompt diff. | ||
# | ||
# This is need for earlier builds of msysgit that does not have it on by | ||
# default for csharp files. | ||
# Note: This is only used by command line | ||
############################################################################### | ||
*.sln merge=union | ||
*.csproj merge=union | ||
*.vbproj merge=union | ||
*.fsproj merge=union | ||
*.dbproj merge=union | ||
*.mod merge=union | ||
*.sum merge=union | ||
*.lock merge=union | ||
|
||
############################################################################### | ||
# Denote all files that are truly binary and should not be modified. | ||
# | ||
# image files are treated as binary by default. | ||
############################################################################### | ||
*.jpg binary | ||
*.png binary | ||
*.gif binary | ||
*.lib binary | ||
*.dll binary | ||
*.pfx binary | ||
*.ico binary | ||
|
||
############################################################################### | ||
# diff behavior for common document formats | ||
# | ||
# Convert binary document formats to text before diffing them. This feature | ||
# is only available from the command line. Turn it on by uncommenting the | ||
# entries below. | ||
############################################################################### | ||
*.doc diff=astextplain | ||
*.DOC diff=astextplain | ||
*.docx diff=astextplain | ||
*.DOCX diff=astextplain | ||
*.dot diff=astextplain | ||
*.DOT diff=astextplain | ||
*.pdf diff=astextplain | ||
*.PDF diff=astextplain | ||
*.rtf diff=astextplain | ||
*.RTF diff=astextplain | ||
|
||
############################################################################### | ||
# linguist language | ||
############################################################################### | ||
# *.mk linguist-language=go |
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.