Skip to content

Commit

Permalink
Added no-duplicate-imports rule (#19)
Browse files Browse the repository at this point in the history
* Added `no-duplicate-imports` rule

* Update eslint.config.mjs

* Update eslint.config.mjs

Co-authored-by: Max Hauser <moritz.heusinger@gmail.com>

---------

Co-authored-by: Max Hauser <moritz.heusinger@gmail.com>
  • Loading branch information
GermanBluefox and foxriver76 authored Nov 17, 2024
1 parent 072bd72 commit df07e1b
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 40 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,12 @@ It is suggested to create separate `eslint.config.mjs` files for backend and for
-->

### **WORK IN PROGRESS**

- (@GermanBluefox) Added `no-duplicate-imports` rule
- (@mcm1957/@foxriver76) allow unused args with `_` prefix in JavaScript too

### 0.1.7 (2024-11-13)

- (@foxriver76) Allow `require` imports for `.js` files

### 0.1.6 (2024-09-16)
Expand Down
1 change: 1 addition & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ const generalRules = {
// https://eslint.org/docs/latest/rules/prefer-template
// Enforce the use of template literals instead of string concatenation: "Hello, " + name + "!" => `Hello, ${name}!`
'prefer-template': 'error',
'no-duplicate-imports': 'error',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unused-expressions': 'off',
};
Expand Down
80 changes: 40 additions & 40 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
{
"name": "@iobroker/eslint-config",
"version": "0.1.7",
"description": "Eslint config of ioBroker",
"homepage": "https://github.com/ioBroker/ioBroker.eslint-config",
"main": "eslint.config.mjs",
"author": {
"name": "foxriver76",
"url": "www.moritz-heusinger.de",
"email": "info@moritz-heusinger.de"
},
"publishConfig": {
"access": "public"
},
"files": [
"eslint.config.mjs",
"prettier.config.mjs",
"README.md"
],
"peerDependencies": {
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.10.0",
"@typescript-eslint/eslint-plugin": "^8.4.0",
"@typescript-eslint/parser": "^8.4.0",
"eslint": ">=9.10.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jsdoc": "^50.2.2",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.36.0",
"eslint-plugin-react-hooks": "^5.1.0-rc.0",
"eslint-plugin-unicorn": "^55.0.0",
"globals": "^15.9.0",
"prettier": "^3.3.3",
"typescript-eslint": "^8.5.0"
},
"devDependencies": {
"@alcalzone/release-script": "^3.8.0"
},
"scripts": {
"release": "release-script -y --noPush"
}
"name": "@iobroker/eslint-config",
"version": "0.1.7",
"description": "Eslint config of ioBroker",
"homepage": "https://github.com/ioBroker/ioBroker.eslint-config",
"main": "eslint.config.mjs",
"author": {
"name": "foxriver76",
"url": "www.moritz-heusinger.de",
"email": "info@moritz-heusinger.de"
},
"publishConfig": {
"access": "public"
},
"files": [
"eslint.config.mjs",
"prettier.config.mjs",
"README.md"
],
"peerDependencies": {
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.10.0",
"@typescript-eslint/eslint-plugin": "^8.4.0",
"@typescript-eslint/parser": "^8.4.0",
"eslint": ">=9.10.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jsdoc": "^50.2.2",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.36.0",
"eslint-plugin-react-hooks": "^5.1.0-rc.0",
"eslint-plugin-unicorn": "^55.0.0",
"globals": "^15.9.0",
"prettier": "^3.3.3",
"typescript-eslint": "^8.5.0"
},
"devDependencies": {
"@alcalzone/release-script": "^3.8.0"
},
"scripts": {
"release": "release-script -y --noPush"
}
}

0 comments on commit df07e1b

Please sign in to comment.