Skip to content

Commit

Permalink
chore: Sort objects
Browse files Browse the repository at this point in the history
  • Loading branch information
mskelton committed Sep 10, 2023
1 parent 1d790c2 commit 8777332
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 28 deletions.
30 changes: 15 additions & 15 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
module.exports = {
env: {
es6: true,
node: true,
},
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
Expand All @@ -10,46 +14,42 @@ module.exports = {
ecmaVersion: 2018,
},
plugins: ["sort"],
env: {
es6: true,
node: true,
},
rules: {
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/no-unused-vars": [
"error",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
},
],
"no-useless-constructor": "off",
"sort/type-properties": "warn",
"sort/string-enums": "warn",
"sort/string-unions": "warn",
"@typescript-eslint/no-useless-constructor": "error",
"no-template-curly-in-string": "error",
"no-unused-vars": "off",
"no-useless-constructor": "off",
"no-useless-rename": "warn",
"prefer-template": "error",
"object-shorthand": "warn",
"prefer-template": "error",
"sort/exports": "off",
"sort/imports": [
"warn",
{
groups: [
{ type: "side-effect", order: 10 },
{ regex: "^\\.+\\/", order: 40 },
{ type: "dependency", order: 20 },
{ type: "other", order: 30 },
{ order: 10, type: "side-effect" },
{ order: 40, regex: "^\\.+\\/" },
{ order: 20, type: "dependency" },
{ order: 30, type: "other" },
],
typeOrder: "last",
},
],
"sort/exports": "off",
"sort/string-enums": "warn",
"sort/string-unions": "warn",
"sort/type-properties": "warn",
},
}
4 changes: 2 additions & 2 deletions jest.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module.exports = {
overrides: [
{
extends: ["plugin:jest/recommended", "plugin:jest/style"],
plugins: ["jest"],
env: { jest: true },
extends: ["plugin:jest/recommended", "plugin:jest/style"],
files: ["**/__tests__/**", "*.{spec,test}.{js,jsx,ts,tsx}"],
plugins: ["jest"],
},
{
env: { jest: true },
Expand Down
20 changes: 10 additions & 10 deletions react.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,15 @@
module.exports = {
env: {
browser: true,
},
extends: "plugin:react/recommended",
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
plugins: ["react-hooks"],
env: {
browser: true,
},
settings: {
react: {
version: "detect",
},
},
rules: {
"react-hooks/exhaustive-deps": "warn",
"react-hooks/rules-of-hooks": "error",
"react/button-has-type": "error",
"react/destructuring-assignment": "error",
"react/function-component-definition": [
Expand All @@ -33,5 +26,12 @@ module.exports = {
"react/prop-types": "off",
"react/react-in-jsx-scope": "off",
"react/self-closing-comp": "warn",
"react-hooks/exhaustive-deps": "warn",
"react-hooks/rules-of-hooks": "error",
},
settings: {
react: {
version: "detect",
},
},
}
2 changes: 1 addition & 1 deletion vitest.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ module.exports = {
overrides: [
{
extends: ["plugin:vitest/all"],
plugins: ["vitest"],
files: ["*.{spec,test}.{js,jsx,cjs,mjs,ts,tsx,cts,mts}"],
plugins: ["vitest"],
rules: {
"vitest/no-hooks": "off",
},
Expand Down

0 comments on commit 8777332

Please sign in to comment.