Skip to content

Commit

Permalink
Convert all warnings to errors
Browse files Browse the repository at this point in the history
  • Loading branch information
studnitz committed Sep 25, 2024
1 parent 3d98bdb commit 56e9f75
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 18 deletions.
7 changes: 7 additions & 0 deletions .changeset/sharp-dancers-build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@clickbar/eslint-config-typescript': patch
'@clickbar/eslint-config-base': patch
'@clickbar/eslint-config-vue': patch
---

Convert all warnings to errors
12 changes: 6 additions & 6 deletions packages/base/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export default function base() {
sourceType: 'module',
},
linterOptions: {
reportUnusedDisableDirectives: 'warn',
reportUnusedDisableDirectives: 'error',
},
plugins: {
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
Expand All @@ -94,8 +94,8 @@ export default function base() {
'import-x/internal-regex': '^(@/)', // allow imports beginning with @/
},
rules: {
'tailwindcss/enforces-negative-arbitrary-values': 'warn',
'tailwindcss/enforces-shorthand': 'warn',
'tailwindcss/enforces-negative-arbitrary-values': 'error',
'tailwindcss/enforces-shorthand': 'error',
'tailwindcss/no-contradicting-classname': 'error',

'import-x/order': [
Expand All @@ -122,7 +122,7 @@ export default function base() {

'unused-imports/no-unused-imports': 'error',
'unused-imports/no-unused-vars': [
'warn',
'error',
{
vars: 'all',
varsIgnorePattern: '^_',
Expand All @@ -149,8 +149,8 @@ export default function base() {
'unicorn/no-nested-ternary': 'off',
'unicorn/number-literal-case': 'off',

'no-console': ['warn', { allow: ['warn', 'error'] }],
'no-debugger': 'warn',
'no-console': ['error', { allow: ['warn', 'error'] }],
'no-debugger': 'error',
'no-var': 'error',
'object-shorthand': ['error', 'always'],
'prefer-const': 'error',
Expand Down
10 changes: 5 additions & 5 deletions packages/typescript/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ export default function typescript() {
'@typescript-eslint/consistent-type-definitions': 'off',

// Adjust levels
'@typescript-eslint/no-unsafe-argument': 'warn',
'@typescript-eslint/no-unsafe-call': 'warn',
'@typescript-eslint/no-unsafe-member-access': 'warn',
'@typescript-eslint/no-unsafe-return': 'warn',
'@typescript-eslint/unified-signatures': 'warn',
'@typescript-eslint/no-unsafe-argument': 'error',
'@typescript-eslint/no-unsafe-call': 'error',
'@typescript-eslint/no-unsafe-member-access': 'error',
'@typescript-eslint/no-unsafe-return': 'error',
'@typescript-eslint/unified-signatures': 'error',
},
},
{
Expand Down
14 changes: 7 additions & 7 deletions packages/vue/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export default function vue() {
['script-setup'], // 'script-setup', 'composition', 'composition-vue2', or 'options'
],
'vue/component-name-in-template-casing': [
'warn',
'error',
'PascalCase',
{ registeredComponentsOnly: false },
],
Expand All @@ -143,9 +143,9 @@ export default function vue() {
],
'vue/define-props-declaration': 'error',
'vue/html-button-has-type': 'error',
'vue/html-comment-content-newline': 'warn',
'vue/html-comment-content-spacing': 'warn',
'vue/html-comment-indent': 'warn',
'vue/html-comment-content-newline': 'error',
'vue/html-comment-content-spacing': 'error',
'vue/html-comment-indent': 'error',
'vue/html-self-closing': [
'error',
{
Expand All @@ -159,10 +159,10 @@ export default function vue() {
},
],
'vue/next-tick-style': ['error', 'promise'],
'vue/no-duplicate-attr-inheritance': 'warn',
'vue/no-duplicate-attr-inheritance': 'error',
'vue/no-empty-component-block': 'error',
'vue/no-multiple-objects-in-class': 'error',
'vue/no-ref-object-reactivity-loss': 'warn',
'vue/no-ref-object-reactivity-loss': 'error',
'vue/no-required-prop-with-default': 'error',
'vue/no-restricted-call-after-await': 'error',
'vue/no-root-v-if': 'error',
Expand All @@ -175,7 +175,7 @@ export default function vue() {
[{ blankLine: 'always', prev: '*', next: '*' }],
],
'vue/prefer-define-options': 'error',
'vue/prefer-import-from-vue': 'warn',
'vue/prefer-import-from-vue': 'error',
'vue/prefer-separate-static-class': 'error',
'vue/prefer-true-attribute-shorthand': 'error',
'vue/require-macro-variable-name': 'error',
Expand Down

0 comments on commit 56e9f75

Please sign in to comment.