-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Make position optional * Update readme file and other minor things * Upgrade dependencies * Maintainability fixes * Bump version for release --------- Co-authored-by: Thomas Bowman Mørch <[email protected]>
- Loading branch information
Showing
13 changed files
with
1,818 additions
and
1,310 deletions.
There are no files selected for viewing
Empty file.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
import typescriptEslint from '@typescript-eslint/eslint-plugin' | ||
import _import from 'eslint-plugin-import' | ||
import importNewlines from 'eslint-plugin-import-newlines' | ||
import { fixupPluginRules } from '@eslint/compat' | ||
import globals from 'globals' | ||
import tsParser from '@typescript-eslint/parser' | ||
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', 'plugin:@typescript-eslint/recommended'), | ||
{ | ||
plugins: { | ||
'@typescript-eslint': typescriptEslint, | ||
import: fixupPluginRules(_import), | ||
'import-newlines': importNewlines, | ||
}, | ||
|
||
languageOptions: { | ||
globals: { | ||
...globals.node, | ||
}, | ||
|
||
parser: tsParser, | ||
ecmaVersion: 'latest', | ||
sourceType: 'module', | ||
}, | ||
|
||
rules: { | ||
'import/order': 'off', | ||
'eol-last': 'error', | ||
'comma-dangle': ['warn', 'always-multiline'], | ||
|
||
indent: ['error', 4, { | ||
SwitchCase: 1, | ||
}], | ||
|
||
'linebreak-style': ['error', 'unix'], | ||
|
||
quotes: ['warn', 'single', { | ||
avoidEscape: true, | ||
}], | ||
|
||
semi: ['warn', 'never'], | ||
|
||
'max-len': ['error', { | ||
code: 180, | ||
}], | ||
|
||
'no-console': ['warn'], | ||
curly: ['error'], | ||
eqeqeq: ['error'], | ||
complexity: ['error', 11], | ||
|
||
'import-newlines/enforce': ['error', { | ||
items: 2, | ||
'max-len': 180, | ||
semi: false, | ||
}], | ||
}, | ||
}, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
"author": { | ||
"name": "Thomas Bowman Mørch" | ||
}, | ||
"version": "0.18.0", | ||
"version": "0.19.0", | ||
"engines": { | ||
"node": ">=14.0.0" | ||
}, | ||
|
@@ -57,34 +57,38 @@ | |
"url": "git+https://github.com/tbowmo/node-red-small-timer.git" | ||
}, | ||
"dependencies": { | ||
"@node-red/util": "^3.1.8", | ||
"date-fns": "^3.6.0", | ||
"@node-red/util": "^3.1.14", | ||
"date-fns": "^4.1.0", | ||
"suncalc": "^1.9.0" | ||
}, | ||
"devDependencies": { | ||
"@types/chai": "^4.3.14", | ||
"@types/mocha": "^10.0.6", | ||
"@types/node": "^20.12.2", | ||
"@eslint/compat": "1.2.1", | ||
"@eslint/eslintrc": "3.1.0", | ||
"@eslint/js": "9.13.0", | ||
"@types/chai": "^4.3.20", | ||
"@types/mocha": "^10.0.9", | ||
"@types/node": "^20.16.13", | ||
"@types/node-red": "^1.3.5", | ||
"@types/node-red-node-test-helper": "^0.3.4", | ||
"@types/suncalc": "^1.9.2", | ||
"@typescript-eslint/eslint-plugin": "^7.4.0", | ||
"@typescript-eslint/parser": "^7.4.0", | ||
"chai": "^4.4.1", | ||
"eslint": "^8.57.0", | ||
"eslint-plugin-import": "^2.29.1", | ||
"@typescript-eslint/eslint-plugin": "^8.10.0", | ||
"@typescript-eslint/parser": "^8.10.0", | ||
"chai": "^4.5.0", | ||
"eslint": "^9.13.0", | ||
"eslint-plugin-import": "^2.31.0", | ||
"eslint-plugin-import-newlines": "^1.4.0", | ||
"husky": "^9.0.11", | ||
"lint-staged": "^15.2.2", | ||
"mocha": "^10.4.0", | ||
"node-red": "^3.1.8", | ||
"node-red-node-test-helper": "^0.3.3", | ||
"nyc": "^15.1.0", | ||
"prettier": "^3.2.5", | ||
"sinon": "^17.0.1", | ||
"globals": "15.11.0", | ||
"husky": "^9.1.6", | ||
"lint-staged": "^15.2.10", | ||
"mocha": "^10.7.3", | ||
"node-red": "^3.1.14", | ||
"node-red-node-test-helper": "^0.3.4", | ||
"nyc": "^17.1.0", | ||
"prettier": "^3.3.3", | ||
"sinon": "^19.0.2", | ||
"source-map-support": "^0.5.21", | ||
"ts-node": "^10.9.2", | ||
"typescript": "^5.4.3" | ||
"typescript": "^5.6.3" | ||
}, | ||
"packageManager": "[email protected]" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.