summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--eslint.config.js24
-rw-r--r--package-lock.json49
-rw-r--r--package.json1
3 files changed, 64 insertions, 10 deletions
diff --git a/eslint.config.js b/eslint.config.js
index 4902b2f0d..faa97e718 100644
--- a/eslint.config.js
+++ b/eslint.config.js
@@ -1,5 +1,6 @@
import globals from 'globals';
import js from '@eslint/js';
+import stylistic from '@stylistic/eslint-plugin';
export default [
js.configs.recommended,
@@ -18,6 +19,10 @@ export default [
}
},
+ plugins: {
+ '@stylistic/js': stylistic
+ },
+
rules: {
'no-undef': 'warn',
'no-unused-vars': 'warn',
@@ -30,18 +35,17 @@ export default [
'no-caller': 'error',
'no-proto': 'error',
- 'linebreak-style': ['error', 'unix'],
- 'eol-last': 'error',
- 'no-trailing-spaces': 'error',
- 'no-multiple-empty-lines': ['error', { 'max': 2 }],
-
- 'keyword-spacing': ['error', { 'after': true, 'before': true }],
- 'block-spacing': ['error', 'always'],
- 'computed-property-spacing': ['error', 'never'],
-
'no-empty': ['error', { 'allowEmptyCatch': true }],
- 'max-statements-per-line': ['warn', { 'max': 2 }]
+ // Stylistic rules (replacing those deprecated in ESLint)
+ '@stylistic/js/linebreak-style': ['error', 'unix'],
+ '@stylistic/js/eol-last': 'error',
+ '@stylistic/js/no-trailing-spaces': 'error',
+ '@stylistic/js/no-multiple-empty-lines': ['error', { 'max': 2 }],
+ '@stylistic/js/keyword-spacing': ['error', { 'after': true, 'before': true }],
+ '@stylistic/js/block-spacing': ['error', 'always'],
+ '@stylistic/js/computed-property-spacing': ['error', 'never'],
+ '@stylistic/js/max-statements-per-line': ['warn', { 'max': 2 }]
}
}
];
diff --git a/package-lock.json b/package-lock.json
index e33ceb57a..017cac879 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -8,6 +8,7 @@
"name": "tt-rss",
"version": "1.0.0",
"devDependencies": {
+ "@stylistic/eslint-plugin": "^5.4.0",
"eslint": "^9.37.0",
"globals": "^16.4.0",
"gulp": "^5.0.1",
@@ -248,6 +249,40 @@
"url": "https://github.com/sponsors/nzakas"
}
},
+ "node_modules/@stylistic/eslint-plugin": {
+ "version": "5.4.0",
+ "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin/-/eslint-plugin-5.4.0.tgz",
+ "integrity": "sha512-UG8hdElzuBDzIbjG1QDwnYH0MQ73YLXDFHgZzB4Zh/YJfnw8XNsloVtytqzx0I2Qky9THSdpTmi8Vjn/pf/Lew==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@eslint-community/eslint-utils": "^4.9.0",
+ "@typescript-eslint/types": "^8.44.0",
+ "eslint-visitor-keys": "^4.2.1",
+ "espree": "^10.4.0",
+ "estraverse": "^5.3.0",
+ "picomatch": "^4.0.3"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "peerDependencies": {
+ "eslint": ">=9.0.0"
+ }
+ },
+ "node_modules/@stylistic/eslint-plugin/node_modules/picomatch": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz",
+ "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
"node_modules/@types/estree": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz",
@@ -262,6 +297,20 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/@typescript-eslint/types": {
+ "version": "8.46.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.46.0.tgz",
+ "integrity": "sha512-bHGGJyVjSE4dJJIO5yyEWt/cHyNwga/zXGJbJJ8TiO01aVREK6gCTu3L+5wrkb1FbDkQ+TKjMNe9R/QQQP9+rA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ }
+ },
"node_modules/acorn": {
"version": "8.15.0",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz",
diff --git a/package.json b/package.json
index 7c0815d09..a2d6daefe 100644
--- a/package.json
+++ b/package.json
@@ -4,6 +4,7 @@
"version": "1.0.0",
"type": "module",
"devDependencies": {
+ "@stylistic/eslint-plugin": "^5.4.0",
"eslint": "^9.37.0",
"globals": "^16.4.0",
"gulp": "^5.0.1",