Skip to content

Commit

Permalink
Merge branch 'main' of github.com:chizukicn/eslint-config into main
Browse files Browse the repository at this point in the history
  • Loading branch information
chizuki committed Feb 6, 2023
2 parents b12805b + 9a15a1c commit 7deb460
Show file tree
Hide file tree
Showing 13 changed files with 42 additions and 15 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@curev/eslint-config-monorepo",
"version": "0.0.3",
"version": "0.0.6",
"private": true,
"packageManager": "[email protected]",
"author": "Anthony Fu <[email protected]> (https://github.com/antfu/)",
Expand Down
2 changes: 1 addition & 1 deletion packages/all/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@curev/eslint-config",
"version": "0.0.3",
"version": "0.0.6",
"description": "Anthony's ESLint config",
"author": "Anthony Fu <[email protected]> (https://github.com/antfu/)",
"license": "MIT",
Expand Down
9 changes: 7 additions & 2 deletions packages/basic/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ module.exports = {
"html",
"unicorn",
"curev",
"unused-imports",
"no-only-tests"
],
settings: {
Expand Down Expand Up @@ -191,7 +192,6 @@ module.exports = {
"curly": ["error", "all"],
"quotes": ["error", "double"],
"quote-props": ["error", "consistent-as-needed"],
"no-unused-vars": "warn",
"no-param-reassign": "off",
"array-bracket-spacing": ["error", "never"],
"brace-style": ["error", "1tbs", { allowSingleLine: true }],
Expand Down Expand Up @@ -309,7 +309,12 @@ module.exports = {
"unicorn/prefer-type-error": "error",
// Use new when throwing error
"unicorn/throw-new-error": "error",

"no-unused-vars": "off", // or "@typescript-eslint/no-unused-vars": "off",
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": [
"error",
{ vars: "all", varsIgnorePattern: "^_", args: "after-used", argsIgnorePattern: "^_" }
],
"no-use-before-define": ["error", { functions: false, classes: false, variables: true }],
"eslint-comments/disable-enable-pair": "off",
"import/no-named-as-default-member": "off",
Expand Down
3 changes: 2 additions & 1 deletion packages/basic/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@curev/eslint-config-basic",
"version": "0.0.3",
"version": "0.0.6",
"description": "",
"author": "Anthony Fu <[email protected]> (https://github.com/antfu/)",
"license": "MIT",
Expand Down Expand Up @@ -29,6 +29,7 @@
"eslint-plugin-no-only-tests": "^3.1.0",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-unicorn": "^44.0.2",
"eslint-plugin-unused-imports": "^2.0.0",
"eslint-plugin-yml": "^1.2.0",
"jsonc-eslint-parser": "^2.1.0",
"yaml-eslint-parser": "^1.1.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/basic/standard.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ module.exports = {
"object-curly-spacing": ["error", "always"],
"object-property-newline": ["error", { allowMultiplePropertiesPerLine: true }],
"one-var": ["error", { initialized: "never" }],
"operator-linebreak": ["error", "after", { overrides: { "?": "before", ":": "before", "|>": "before" } }],
"operator-linebreak": ["error", "after", { overrides: { "?": "before", ":": "before", "|>": "before", "&&": "before" } }],
"padded-blocks": ["error", { blocks: "never", switches: "never", classes: "never" }],
"prefer-const": ["error", { destructuring: "all" }],
"prefer-promise-reject-errors": "error",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-curev/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-curev",
"version": "0.0.3",
"version": "0.0.6",
"license": "MIT",
"homepage": "https://github.com/antfu/eslint-config",
"main": "./dist/index.cjs",
Expand Down
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@curev/eslint-config-react",
"version": "0.0.3",
"version": "0.0.6",
"description": "",
"author": "Anthony Fu <[email protected]> (https://github.com/antfu/)",
"license": "MIT",
Expand Down
4 changes: 2 additions & 2 deletions packages/typescript/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ module.exports = {
overrides: basic.overrides,
rules: {
"import/named": "off",
"semi": "off",

// TS
"@typescript-eslint/ban-ts-comment": ["error", { "ts-ignore": "allow-with-description" }],
Expand Down Expand Up @@ -65,7 +66,7 @@ module.exports = {
offsetTernaryExpressions: true
}],
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
"@typescript-eslint/no-unused-vars": "off",
"no-redeclare": "off",
"@typescript-eslint/no-redeclare": "error",
"no-use-before-define": "off",
Expand All @@ -76,7 +77,6 @@ module.exports = {
"@typescript-eslint/comma-dangle": ["error", "never"],
"object-curly-spacing": "off",
"@typescript-eslint/object-curly-spacing": ["error", "always"],
"semi": "off",
"@typescript-eslint/semi": ["error", "always"],
"quotes": "off",
"@typescript-eslint/quotes": ["error", "double"],
Expand Down
2 changes: 1 addition & 1 deletion packages/typescript/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@curev/eslint-config-ts",
"version": "0.0.3",
"version": "0.0.6",
"description": "",
"author": "Anthony Fu <[email protected]> (https://github.com/antfu/)",
"license": "MIT",
Expand Down
6 changes: 3 additions & 3 deletions packages/vue/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ module.exports = {
parser: "@typescript-eslint/parser"
},
rules: {
"no-unused-vars": "off",
"no-undef": "off",
"indent": "off",
"@typescript-eslint/indent": "off",
"multiline-ternary": "off",
...(TS
? { "@typescript-eslint/no-unused-vars": "off" }
? {
"@typescript-eslint/indent": "off"
}
: null)
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/vue/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@curev/eslint-config-vue",
"version": "0.0.3",
"version": "0.0.6",
"description": "",
"author": "Anthony Fu <[email protected]> (https://github.com/antfu/)",
"license": "MIT",
Expand Down
21 changes: 21 additions & 0 deletions pnpm-lock.yaml

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

0 comments on commit 7deb460

Please sign in to comment.