Skip to content

Commit

Permalink
chore: release 37.0.0
Browse files Browse the repository at this point in the history
BREAKING CHANGE: upgrade eslint-plugin-unicorn
  • Loading branch information
Cherry committed May 10, 2024
1 parent ce1957e commit 2863a0f
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 27 deletions.
97 changes: 77 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nodecraft/eslint-config",
"version": "37.0.0",
"version": "38.0.0",
"description": "Nodecraft base JS ESLint config",
"keywords": [
"eslint",
Expand Down Expand Up @@ -32,8 +32,8 @@
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-import-newlines": "^1.4.0",
"eslint-plugin-json": "^3.1.0",
"eslint-plugin-n": "^17.5.1",
"eslint-plugin-unicorn": "^52.0.0",
"eslint-plugin-n": "^17.6.0",
"eslint-plugin-unicorn": "^53.0.0",
"eslint-plugin-vue": "^9.26.0",
"eslint-plugin-vuejs-accessibility": "^2.3.0",
"typescript": "^5.4.5"
Expand All @@ -46,8 +46,8 @@
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-import-newlines": "^1.4.0",
"eslint-plugin-json": "^3.1.0",
"eslint-plugin-n": "^17.5.1",
"eslint-plugin-unicorn": "^52.0.0",
"eslint-plugin-n": "^17.6.0",
"eslint-plugin-unicorn": "^53.0.0",
"eslint-plugin-vue": "^9.26.0",
"eslint-plugin-vuejs-accessibility": "^2.3.0",
"typescript": "^5.4.5"
Expand Down
9 changes: 7 additions & 2 deletions rules/plugin-unicorn.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ module.exports = {
// Use destructured variables over properties
'unicorn/consistent-destructuring': 'off',

// Prefer consistent types when spreading a ternary in an array literal.
'unicorn/consistent-empty-array-spread': 'error',

// Move function definitions to the highest possible scope
'unicorn/consistent-function-scoping': 'off',

Expand Down Expand Up @@ -292,8 +295,7 @@ module.exports = {
'unicorn/prefer-spread': 'error',

// Prefer String#replaceAll() over regex searches with the global flag
// TODO: enable for Node 15+
'unicorn/prefer-string-replace-all': 'off',
'unicorn/prefer-string-replace-all': 'error',

// Prefer String#slice() over String#substr() and String#substring()
'unicorn/prefer-string-slice': 'error',
Expand All @@ -304,6 +306,9 @@ module.exports = {
// Prefer String#trimStart() / String#trimEnd() over String#trimLeft() / String#trimRight()
'unicorn/prefer-string-trim-start-end': 'error',

// Prefer using structuredClone to create a deep clone
'unicorn/prefer-structured-clone': 'error',

// Prefer switch over multiple else-if
'unicorn/prefer-switch': 'off',

Expand Down

0 comments on commit 2863a0f

Please sign in to comment.