eslint-config-metarhia
Advanced tools
Comparing version
10
index.js
'use strict'; | ||
const { recommended } = require('@eslint/js').configs; | ||
const configPrettier = require('eslint-config-prettier'); | ||
const pluginPrettier = require('eslint-plugin-prettier'); | ||
const metarhia = { | ||
const configMetarhia = { | ||
languageOptions: { | ||
@@ -11,4 +13,6 @@ ecmaVersion: 'latest', | ||
BigInt: true, | ||
console: true, | ||
}, | ||
}, | ||
plugins: { prettier: pluginPrettier }, | ||
ignores: ['node_modules/*'], | ||
@@ -32,5 +36,5 @@ rules: {}, | ||
for (const section of sections) { | ||
Object.assign(metarhia.rules, section); | ||
Object.assign(configMetarhia.rules, section); | ||
} | ||
module.exports = [recommended, metarhia]; | ||
module.exports = [recommended, configPrettier, configMetarhia]; |
{ | ||
"name": "eslint-config-metarhia", | ||
"version": "9.0.0", | ||
"version": "9.0.1", | ||
"author": "Alexey Orlenko <eaglexrlnk@gmail.com>", | ||
@@ -17,5 +17,7 @@ "license": "MIT", | ||
"main": "index.js", | ||
"files": ["rules/", "scripts/"], | ||
"files": [ | ||
"rules/" | ||
], | ||
"engines": { | ||
"node": "20 || 21 || 22" | ||
"node": "18 || 20 || 21 || 22" | ||
}, | ||
@@ -35,12 +37,12 @@ "repository": { | ||
"scripts": { | ||
"lint": "eslint . && prettier --check \"**/*.js\" \"**/*.json\" \"**/*.md\" \".*rc\"", | ||
"fmt": "prettier --write \"**/*.js\" \"**/*.json\" \"**/*.md\" \".*rc\"", | ||
"test": "npm run -s lint" | ||
"test": "npm run -s lint", | ||
"lint": "eslint . && prettier -c \"**/*.js\" \"**/*.json\" \"**/*.md\"", | ||
"fix": "eslint . --fix && prettier --write \"**/*.js\" \"**/*.json\" \"**/*.md\"" | ||
}, | ||
"devDependencies": { | ||
"eslint": "^9.9.0", | ||
"prettier": "^3.1.0", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-plugin-prettier": "^5.1.3" | ||
"eslint-plugin-prettier": "^5.2.1", | ||
"prettier": "^3.3.3" | ||
} | ||
} |
'use strict'; | ||
module.exports = { | ||
indent: [ | ||
'error', | ||
2, | ||
{ | ||
SwitchCase: 1, | ||
VariableDeclarator: { | ||
let: 2, | ||
const: 3, | ||
}, | ||
MemberExpression: 1, | ||
}, | ||
], | ||
indent: ['off'], | ||
'block-spacing': ['error', 'always'], | ||
@@ -17,0 +6,0 @@ 'brace-style': [ |
8539
0.7%218
-3.11%