Skip to content

Commit

Permalink
Eslint9
Browse files Browse the repository at this point in the history
  • Loading branch information
HGlab01 authored Aug 21, 2024
1 parent c68e731 commit f36d5f1
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 32 deletions.
29 changes: 0 additions & 29 deletions .eslintrc.json

This file was deleted.

1 change: 0 additions & 1 deletion .github/workflows/test-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ on:

jobs:
build:

runs-on: ubuntu-latest

strategy:
Expand Down
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"recommendations": [
"dbaeumer.vscode-eslint"
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode"
]
}
37 changes: 37 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import globals from 'globals';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import js from '@eslint/js';
import { FlatCompat } from '@eslint/eslintrc';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

export default [...compat.extends('eslint:recommended'), {
languageOptions: {
globals: {
...globals.node,
...globals.mocha
},
ecmaVersion: 2023,
sourceType: 'module'
},
rules: {
indent: ['warn', 4, {
SwitchCase: 1
}],
'no-console': 'off',
'no-trailing-spaces': 'error',
quotes: ['error', 'single', {
avoidEscape: true,
allowTemplateLiterals: true
}],
semi: ['error', 'always'],
'comma-dangle': ['error', 'only-multiline']
},
}];
2 changes: 1 addition & 1 deletion jsonExplorer.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ function traverseJson(jObject, parent = null, replaceName = false, replaceID = f
/**
* Analysis modify element in stateAttr.js and executes command
* @param {string} method defines the method to be executed (e.g. round())
* @param {string | number} value value to be executed
* @param {string | number} value value to be executed
*/
function modify(method, value) {
adapter.log.silly(`Function modify with method "${method}" and value "${value}"`);
Expand Down

0 comments on commit f36d5f1

Please sign in to comment.