-
Notifications
You must be signed in to change notification settings - Fork 7
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
refactor!: use eslint 9 #29
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
# editorconfig.org | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* text=auto | ||
package-lock.json -diff |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,20 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (http://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules | ||
jspm_packages | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
.cspellcache | ||
.eslintcache | ||
|
||
/coverage | ||
/dist | ||
/local | ||
/reports | ||
/node_modules | ||
/test/outputs | ||
|
||
.DS_Store | ||
Thumbs.db | ||
.idea | ||
.vscode | ||
*.sublime-project | ||
*.sublime-workspace | ||
*.iml |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
npx --no-install commitlint --edit $1 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
npx --no-install lint-staged |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/coverage | ||
/dist | ||
/node_modules | ||
CHANGELOG.md |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = { singleQuote: true }; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module.exports = { | ||
extends: ['@commitlint/config-conventional'], | ||
rules: { | ||
'header-max-length': [0], | ||
'body-max-line-length': [0], | ||
'footer-max-line-length': [0], | ||
}, | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = [require('./'), require('eslint-config-prettier')]; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,24 @@ | ||
const globals = require('globals'); | ||
|
||
module.exports = { | ||
extends: [ | ||
'./rules/imports', | ||
'./rules/possible-errors', | ||
'./rules/best-practices', | ||
'./rules/variables', | ||
'./rules/node', | ||
'./rules/stylistic-issues', | ||
'./rules/es2015' | ||
].map(require.resolve), | ||
parserOptions: { | ||
ecmaVersion: 2018, | ||
env: { | ||
es6: true, | ||
jest: true | ||
// require('./rules/imports'), | ||
...require('./rules/possible-errors'), | ||
...require('./rules/best-practices'), | ||
...require('./rules/variables'), | ||
...require('./rules/node'), | ||
...require('./rules/stylistic-issues'), | ||
...require('./rules/es2015'), | ||
...{ | ||
languageOptions: { | ||
ecmaVersion: 2018, | ||
sourceType: 'module', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This can be a problem, some packages are still in commonjs Let's make two things - |
||
globals: { | ||
...globals.es6, | ||
...globals.jest, | ||
}, | ||
}, | ||
rules: { | ||
strict: 'error', | ||
}, | ||
sourceType: 'module' | ||
}, | ||
rules: { | ||
strict: 'error', | ||
}, | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module.exports = { | ||
'*': ['prettier --cache --write --ignore-unknown'], | ||
'*.js': ['eslint --cache --fix'], | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why it is comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
waiting import-js/eslint-plugin-import#2996