# @xwtec/eslint-config

> ESLint Configuration for xwtec projects

Latest version **11.0.3** (published 2024-09-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install @xwtec/eslint-config
pnpm add @xwtec/eslint-config
yarn add @xwtec/eslint-config
bun add @xwtec/eslint-config
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 11.0.3 |
| Published | 2024-09-04 |
| First published | 2018-12-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Node | >=18 |
| Dependencies | 7 |
| Unpacked size | 43.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | xwtec |
| Maintainers | fisker |
| Keywords | xwtec, eslint, config |

## Links

- npm: https://www.npmjs.com/package/@xwtec/eslint-config
- Repository: https://github.com/xwtec/eslint-config
- Homepage: https://github.com/xwtec/eslint-config#readme
- Issues: https://github.com/xwtec/eslint-config/issues
- npm.io page: https://npm.io/package/@xwtec/eslint-config

## Dependencies (7)

- [globals](https://npm.io/package/globals.md) ^15.6.0
- [@babel/core](https://npm.io/package/@babel/core.md) ^7.24.9
- [@babel/eslint-parser](https://npm.io/package/@babel/eslint-parser.md) ^7.25.1
- [eslint-plugin-regexp](https://npm.io/package/eslint-plugin-regexp.md) ^2.6.0
- [eslint-config-prettier](https://npm.io/package/eslint-config-prettier.md) ^9.1.0
- [confusing-browser-globals](https://npm.io/package/confusing-browser-globals.md) ^1.0.11
- [eslint-plugin-simple-import-sort](https://npm.io/package/eslint-plugin-simple-import-sort.md) ^12.1.1

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@pandacss/eslint-plugin](https://npm.io/package/@pandacss/eslint-plugin.md) — 18.7K weekly downloads

## Recent versions

- 11.0.3 (latest) — 2024-09-04
- 11.0.2 — 2024-06-27
- 11.0.1 — 2024-06-27
- 11.0.0 — 2024-06-27
- 10.0.1 — 2024-06-27
- 10.0.0 — 2024-06-25
- 9.0.1 — 2023-08-01
- 9.0.0 — 2023-08-01
- 8.6.0 — 2023-07-11
- 8.5.0 — 2022-11-09
- 8.4.0 — 2022-10-13
- 8.3.0 — 2022-07-27
- 8.2.1 — 2022-05-19
- 8.2.0 — 2022-05-12
- 8.1.3 — 2021-12-15
- … 136 more at https://npm.io/package/@xwtec/eslint-config/versions

## README

# @xwtec/eslint-config

> ESLint Configuration for xwtec projects

## Install

```bash
yarn add --dev eslint @xwtec/eslint-config
```

## Configuration

Add the following code to your `eslint.config.mjs`.

```js
import xwtecEslintConfig from '@xwtec/eslint-config';

export default [
  xwtecEslintConfig,
  {
    rules: {
      'unicorn/no-array-for-each': 'error',
    },
  },
].flat();
```

## Usage

```bash
npx eslint
```

## Rules

<!-- rules start -->

<!-- AUTO GENERATED CONTENT, DON'T EDIT -->

### Error

|  #  | Type  | Rule                                                                                                        | Description                                                                         |
| :-: | :---: | :---------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------- |
|  1  | error | [no-caller](https://eslint.org/docs/latest/rules/no-caller)                                                 | Disallow the use of `arguments.caller` or `arguments.callee`                        |
|  2  | error | [no-class-assign](https://eslint.org/docs/latest/rules/no-class-assign)                                     | Disallow reassigning class members                                                  |
|  3  | error | [no-const-assign](https://eslint.org/docs/latest/rules/no-const-assign)                                     | Disallow reassigning `const` variables                                              |
|  4  | error | [no-delete-var](https://eslint.org/docs/latest/rules/no-delete-var)                                         | Disallow deleting variables                                                         |
|  5  | error | [no-dupe-args](https://eslint.org/docs/latest/rules/no-dupe-args)                                           | Disallow duplicate arguments in `function` definitions                              |
|  6  | error | [no-dupe-class-members](https://eslint.org/docs/latest/rules/no-dupe-class-members)                         | Disallow duplicate class members                                                    |
|  7  | error | [no-dupe-else-if](https://eslint.org/docs/latest/rules/no-dupe-else-if)                                     | Disallow duplicate conditions in if-else-if chains                                  |
|  8  | error | [no-dupe-keys](https://eslint.org/docs/latest/rules/no-dupe-keys)                                           | Disallow duplicate keys in object literals                                          |
|  9  | error | [no-empty-pattern](https://eslint.org/docs/latest/rules/no-empty-pattern)                                   | Disallow empty destructuring patterns                                               |
| 10  | error | [no-eval](https://eslint.org/docs/latest/rules/no-eval)                                                     | Disallow the use of `eval()`                                                        |
| 11  | error | [no-func-assign](https://eslint.org/docs/latest/rules/no-func-assign)                                       | Disallow reassigning `function` declarations                                        |
| 12  | error | [no-implied-eval](https://eslint.org/docs/latest/rules/no-implied-eval)                                     | Disallow the use of `eval()`-like methods                                           |
| 13  | error | [no-import-assign](https://eslint.org/docs/latest/rules/no-import-assign)                                   | Disallow assigning to imported bindings                                             |
| 14  | error | [no-irregular-whitespace](https://eslint.org/docs/latest/rules/no-irregular-whitespace)                     | Disallow irregular whitespace                                                       |
| 15  | error | [no-new-symbol](https://eslint.org/docs/latest/rules/no-new-symbol)                                         | Disallow `new` operators with the `Symbol` object                                   |
| 16  | error | [no-obj-calls](https://eslint.org/docs/latest/rules/no-obj-calls)                                           | Disallow calling global object properties as functions                              |
| 17  | error | [no-redeclare](https://eslint.org/docs/latest/rules/no-redeclare)                                           | Disallow variable redeclaration                                                     |
| 18  | error | [no-restricted-globals](https://eslint.org/docs/latest/rules/no-restricted-globals)                         | Disallow specified global variables                                                 |
| 19  | error | [no-self-compare](https://eslint.org/docs/latest/rules/no-self-compare)                                     | Disallow comparisons where both sides are exactly the same                          |
| 20  | error | [no-sequences](https://eslint.org/docs/latest/rules/no-sequences)                                           | Disallow comma operators                                                            |
| 21  | error | [no-setter-return](https://eslint.org/docs/latest/rules/no-setter-return)                                   | Disallow returning values from setters                                              |
| 22  | error | [no-undef](https://eslint.org/docs/latest/rules/no-undef)                                                   | Disallow the use of undeclared variables unless mentioned in `/*global */` comments |
| 23  | error | [no-unused-expressions](https://eslint.org/docs/latest/rules/no-unused-expressions)                         | Disallow unused expressions                                                         |
| 24  | error | [radix](https://eslint.org/docs/latest/rules/radix)                                                         | Enforce the consistent use of the radix argument when using `parseInt()`            |
| 25  | error | [require-yield](https://eslint.org/docs/latest/rules/require-yield)                                         | Require generator functions to contain `yield`                                      |
| 26  | error | [use-isnan](https://eslint.org/docs/latest/rules/use-isnan)                                                 | Require calls to `isNaN()` when checking for `NaN`                                  |
| 27  | error | [regexp/no-legacy-features](https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-legacy-features.html) | disallow legacy RegExp features                                                     |

### Warn

|  #  | Type | Rule                                                                                              | Description                                                                              |
| :-: | :--: | :------------------------------------------------------------------------------------------------ | :--------------------------------------------------------------------------------------- |
|  1  | warn | [constructor-super](https://eslint.org/docs/latest/rules/constructor-super)                       | Require `super()` calls in constructors                                                  |
|  2  | warn | [default-case-last](https://eslint.org/docs/latest/rules/default-case-last)                       | Enforce default clauses in switch statements to be last                                  |
|  3  | warn | [for-direction](https://eslint.org/docs/latest/rules/for-direction)                               | Enforce "for" loop update clause moving the counter in the right direction               |
|  4  | warn | [getter-return](https://eslint.org/docs/latest/rules/getter-return)                               | Enforce `return` statements in getters                                                   |
|  5  | warn | [no-case-declarations](https://eslint.org/docs/latest/rules/no-case-declarations)                 | Disallow lexical declarations in case clauses                                            |
|  6  | warn | [no-compare-neg-zero](https://eslint.org/docs/latest/rules/no-compare-neg-zero)                   | Disallow comparing against -0                                                            |
|  7  | warn | [no-constant-condition](https://eslint.org/docs/latest/rules/no-constant-condition)               | Disallow constant expressions in conditions                                              |
|  8  | warn | [no-duplicate-case](https://eslint.org/docs/latest/rules/no-duplicate-case)                       | Disallow duplicate case labels                                                           |
|  9  | warn | [no-empty](https://eslint.org/docs/latest/rules/no-empty)                                         | Disallow empty block statements                                                          |
| 10  | warn | [no-empty-character-class](https://eslint.org/docs/latest/rules/no-empty-character-class)         | Disallow empty character classes in regular expressions                                  |
| 11  | warn | [no-ex-assign](https://eslint.org/docs/latest/rules/no-ex-assign)                                 | Disallow reassigning exceptions in `catch` clauses                                       |
| 12  | warn | [no-extend-native](https://eslint.org/docs/latest/rules/no-extend-native)                         | Disallow extending native types                                                          |
| 13  | warn | [no-fallthrough](https://eslint.org/docs/latest/rules/no-fallthrough)                             | Disallow fallthrough of `case` statements                                                |
| 14  | warn | [no-global-assign](https://eslint.org/docs/latest/rules/no-global-assign)                         | Disallow assignments to native objects or read-only global variables                     |
| 15  | warn | [no-inner-declarations](https://eslint.org/docs/latest/rules/no-inner-declarations)               | Disallow variable or `function` declarations in nested blocks                            |
| 16  | warn | [no-invalid-regexp](https://eslint.org/docs/latest/rules/no-invalid-regexp)                       | Disallow invalid regular expression strings in `RegExp` constructors                     |
| 17  | warn | [no-iterator](https://eslint.org/docs/latest/rules/no-iterator)                                   | Disallow the use of the `__iterator__` property                                          |
| 18  | warn | [no-labels](https://eslint.org/docs/latest/rules/no-labels)                                       | Disallow labeled statements                                                              |
| 19  | warn | [no-multi-str](https://eslint.org/docs/latest/rules/no-multi-str)                                 | Disallow multiline strings                                                               |
| 20  | warn | [no-new-wrappers](https://eslint.org/docs/latest/rules/no-new-wrappers)                           | Disallow `new` operators with the `String`, `Number`, and `Boolean` objects              |
| 21  | warn | [no-octal](https://eslint.org/docs/latest/rules/no-octal)                                         | Disallow octal literals                                                                  |
| 22  | warn | [no-octal-escape](https://eslint.org/docs/latest/rules/no-octal-escape)                           | Disallow octal escape sequences in string literals                                       |
| 23  | warn | [no-proto](https://eslint.org/docs/latest/rules/no-proto)                                         | Disallow the use of the `__proto__` property                                             |
| 24  | warn | [no-restricted-properties](https://eslint.org/docs/latest/rules/no-restricted-properties)         | Disallow certain properties on certain objects                                           |
| 25  | warn | [no-self-assign](https://eslint.org/docs/latest/rules/no-self-assign)                             | Disallow assignments where both sides are exactly the same                               |
| 26  | warn | [no-sparse-arrays](https://eslint.org/docs/latest/rules/no-sparse-arrays)                         | Disallow sparse arrays                                                                   |
| 27  | warn | [no-this-before-super](https://eslint.org/docs/latest/rules/no-this-before-super)                 | Disallow `this`/`super` before calling `super()` in constructors                         |
| 28  | warn | [no-throw-literal](https://eslint.org/docs/latest/rules/no-throw-literal)                         | Disallow throwing literals as exceptions                                                 |
| 29  | warn | [no-unmodified-loop-condition](https://eslint.org/docs/latest/rules/no-unmodified-loop-condition) | Disallow unmodified loop conditions                                                      |
| 30  | warn | [no-unreachable](https://eslint.org/docs/latest/rules/no-unreachable)                             | Disallow unreachable code after `return`, `throw`, `continue`, and `break` statements    |
| 31  | warn | [no-unsafe-finally](https://eslint.org/docs/latest/rules/no-unsafe-finally)                       | Disallow control flow statements in `finally` blocks                                     |
| 32  | warn | [no-unsafe-negation](https://eslint.org/docs/latest/rules/no-unsafe-negation)                     | Disallow negating the left operand of relational operators                               |
| 33  | warn | [no-unsafe-optional-chaining](https://eslint.org/docs/latest/rules/no-unsafe-optional-chaining)   | Disallow use of optional chaining in contexts where the `undefined` value is not allowed |
| 34  | warn | [no-unused-vars](https://eslint.org/docs/latest/rules/no-unused-vars)                             | Disallow unused variables                                                                |
| 35  | warn | [no-useless-escape](https://eslint.org/docs/latest/rules/no-useless-escape)                       | Disallow unnecessary escape characters                                                   |
| 36  | warn | [no-void](https://eslint.org/docs/latest/rules/no-void)                                           | Disallow `void` operators                                                                |
| 37  | warn | [no-with](https://eslint.org/docs/latest/rules/no-with)                                           | Disallow `with` statements                                                               |
| 38  | warn | [valid-typeof](https://eslint.org/docs/latest/rules/valid-typeof)                                 | Enforce comparing `typeof` expressions against valid strings                             |

### Fixable

|  #  | Type  | Rule                                                                                                  | Description                                                                                                           |
| :-: | :---: | :---------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------- |
|  1  | warn  | [curly](https://eslint.org/docs/latest/rules/curly)                                                   | Enforce consistent brace style for all control statements                                                             |
|  2  | warn  | [dot-notation](https://eslint.org/docs/latest/rules/dot-notation)                                     | Enforce dot notation whenever possible                                                                                |
|  3  | error | [eqeqeq](https://eslint.org/docs/latest/rules/eqeqeq)                                                 | Require the use of `===` and `!==`                                                                                    |
|  4  | warn  | [no-div-regex](https://eslint.org/docs/latest/rules/no-div-regex)                                     | Disallow equal signs explicitly at the beginning of regular expressions                                               |
|  5  | warn  | [no-else-return](https://eslint.org/docs/latest/rules/no-else-return)                                 | Disallow `else` blocks after `return` statements in `if` statements                                                   |
|  6  | warn  | [no-extra-bind](https://eslint.org/docs/latest/rules/no-extra-bind)                                   | Disallow unnecessary calls to `.bind()`                                                                               |
|  7  | warn  | [no-extra-boolean-cast](https://eslint.org/docs/latest/rules/no-extra-boolean-cast)                   | Disallow unnecessary boolean casts                                                                                    |
|  8  | warn  | [no-extra-label](https://eslint.org/docs/latest/rules/no-extra-label)                                 | Disallow unnecessary labels                                                                                           |
|  9  | warn  | [no-regex-spaces](https://eslint.org/docs/latest/rules/no-regex-spaces)                               | Disallow multiple spaces in regular expressions                                                                       |
| 10  | warn  | [no-undef-init](https://eslint.org/docs/latest/rules/no-undef-init)                                   | Disallow initializing variables to `undefined`                                                                        |
| 11  | warn  | [no-unneeded-ternary](https://eslint.org/docs/latest/rules/no-unneeded-ternary)                       | Disallow ternary operators when simpler alternatives exist                                                            |
| 12  | warn  | [no-unused-labels](https://eslint.org/docs/latest/rules/no-unused-labels)                             | Disallow unused labels                                                                                                |
| 13  | warn  | [no-useless-computed-key](https://eslint.org/docs/latest/rules/no-useless-computed-key)               | Disallow unnecessary computed property keys in objects and classes                                                    |
| 14  | warn  | [no-useless-rename](https://eslint.org/docs/latest/rules/no-useless-rename)                           | Disallow renaming import, export, and destructured assignments to the same name                                       |
| 15  | warn  | [no-useless-return](https://eslint.org/docs/latest/rules/no-useless-return)                           | Disallow redundant return statements                                                                                  |
| 16  | warn  | [no-var](https://eslint.org/docs/latest/rules/no-var)                                                 | Require `let` or `const` instead of `var`                                                                             |
| 17  | warn  | [object-shorthand](https://eslint.org/docs/latest/rules/object-shorthand)                             | Require or disallow method and property shorthand syntax for object literals                                          |
| 18  | warn  | [one-var](https://eslint.org/docs/latest/rules/one-var)                                               | Enforce variables to be declared either together or separately in functions                                           |
| 19  | warn  | [operator-assignment](https://eslint.org/docs/latest/rules/operator-assignment)                       | Require or disallow assignment operator shorthand where possible                                                      |
| 20  | warn  | [prefer-const](https://eslint.org/docs/latest/rules/prefer-const)                                     | Require `const` declarations for variables that are never reassigned after declared                                   |
| 21  | warn  | [prefer-destructuring](https://eslint.org/docs/latest/rules/prefer-destructuring)                     | Require destructuring from arrays and/or objects                                                                      |
| 22  | warn  | [prefer-exponentiation-operator](https://eslint.org/docs/latest/rules/prefer-exponentiation-operator) | Disallow the use of `Math.pow` in favor of the `**` operator                                                          |
| 23  | warn  | [prefer-numeric-literals](https://eslint.org/docs/latest/rules/prefer-numeric-literals)               | Disallow `parseInt()` and `Number.parseInt()` in favor of binary, octal, and hexadecimal literals                     |
| 24  | warn  | [prefer-object-spread](https://eslint.org/docs/latest/rules/prefer-object-spread)                     | Disallow using Object.assign with an object literal as the first argument and prefer the use of object spread instead |
| 25  | warn  | [prefer-template](https://eslint.org/docs/latest/rules/prefer-template)                               | Require template literals instead of string concatenation                                                             |
| 26  | warn  | [spaced-comment](https://eslint.org/docs/latest/rules/spaced-comment)                                 | Enforce consistent spacing after the `//` or `/*` in a comment                                                        |
| 27  | warn  | [unicode-bom](https://eslint.org/docs/latest/rules/unicode-bom)                                       | Require or disallow Unicode byte order mark (BOM)                                                                     |
| 28  | warn  | [yoda](https://eslint.org/docs/latest/rules/yoda)                                                     | Require or disallow "Yoda" conditions                                                                                 |
| 29  | warn  | [simple-import-sort/exports](https://github.com/lydell/eslint-plugin-simple-import-sort#sort-order)   | -                                                                                                                     |
| 30  | warn  | [simple-import-sort/imports](https://github.com/lydell/eslint-plugin-simple-import-sort#sort-order)   | -                                                                                                                     |

<!-- rules end -->

## Related

- [@xwtec/eslint-config-vue](https://github.com/xwtec/eslint-config-vue)
- [@xwtec/eslint-config-legacy](https://github.com/xwtec/eslint-config-legacy)
- [@xwtec/prettier-config](https://github.com/xwtec/prettier-config)

## Links

- [ESLint](https://eslint.org/)
- [Prettier](https://prettier.io/)

---
_Source: https://npm.io/package/@xwtec/eslint-config · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
