Skip to content

Commit

Permalink
Merge branch 'main' into fixing-peer-dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
GermanBluefox authored Nov 14, 2024
2 parents f5ef3cc + 9bdcbd3 commit bb3effe
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,15 @@ It is suggested to create separate `eslint.config.mjs` files for backend and for
Placeholder for the next version (at the beginning of the line):
### **WORK IN PROGRESS**
-->

### **WORK IN PROGRESS**

- (@GermanBluefox) Corrected the peer dependencies

### 0.1.7 (2024-11-13)
- (@foxriver76) Allow `require` imports for `.js` files


### 0.1.6 (2024-09-16)

- (@GermanBluefox) Enforce the use of template literals instead of string concatenation: "Hello, " + name + "!" => `Hello, ${name}!`
Expand Down
10 changes: 9 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'
import globals from 'globals';
import reactPlugin from 'eslint-plugin-react';
import reactHooksPlugin from 'eslint-plugin-react-hooks';

/**
* Rules for all JSDOC plugin usages
*/
Expand Down Expand Up @@ -136,6 +137,10 @@ const tsRules = {
'@typescript-eslint/consistent-type-exports': 'error',
};

/** Separate config for .js files which is applied internally */
const plainJsConfig = tseslint.configs.disableTypeChecked
plainJsConfig.rules['@typescript-eslint/no-require-imports'] = 'off';

/** @type {import("eslint").Linter.FlatConfig[]} */
export default tseslint.config(
eslint.configs.recommended,
Expand Down Expand Up @@ -163,7 +168,7 @@ export default tseslint.config(
},
{
files: ['**/*.js'],
...tseslint.configs.disableTypeChecked,
...plainJsConfig,
},
);

Expand All @@ -177,6 +182,9 @@ export const esmConfig = [
},
];

/**
* Config for React projects
*/
export const reactConfig = [
{
plugins: {
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@iobroker/eslint-config",
"version": "0.1.6",
"version": "0.1.7",
"description": "Eslint config of ioBroker",
"homepage": "https://github.com/ioBroker/ioBroker.eslint-config",
"main": "eslint.config.mjs",
Expand Down

0 comments on commit bb3effe

Please sign in to comment.