eslint-config-aether
Advanced tools
Comparing version 1.5.3 to 2.0.0
@@ -1,15 +0,20 @@ | ||
module.exports = { | ||
"extends": "eslint:recommended", | ||
"env": { | ||
"es2024": true, | ||
"browser": true, | ||
"worker": true, | ||
"jquery": true, | ||
"node": true | ||
import js from "@eslint/js"; | ||
import globals from "globals"; | ||
export default { | ||
"files": [ | ||
"**/*.js", | ||
"**/*.ts", | ||
], | ||
"languageOptions": { | ||
"globals": { | ||
...globals.browser, | ||
...globals.es2025, | ||
...globals.jquery, | ||
...globals.node, | ||
...globals.worker | ||
} | ||
}, | ||
"parserOptions": { | ||
"sourceType": "module", | ||
"impliedStrict": true | ||
}, | ||
"rules": { | ||
...js.configs.recommended.rules, | ||
"array-bracket-spacing": ["warn", "never"], | ||
@@ -16,0 +21,0 @@ "block-spacing": ["warn", "always"], |
@@ -1,1 +0,7 @@ | ||
module.exports = require("./default.js"); | ||
import defaultConfig from "./default.js"; | ||
import tsConfig from "./typescript.js"; | ||
export default [ | ||
defaultConfig, | ||
tsConfig | ||
]; |
{ | ||
"name": "eslint-config-aether", | ||
"version": "1.5.3", | ||
"version": "2.0.0", | ||
"description": "A custom code style for ESLint.", | ||
"homepage": "https://github.com/vanruesc/eslint-config-aether", | ||
"main": "index.js", | ||
"main": "./index.js", | ||
"license": "Zlib", | ||
"type": "module", | ||
"exports": { | ||
".": { | ||
"types": "./index.d.ts", | ||
"default": "./index.js" | ||
} | ||
}, | ||
"keywords": [ | ||
"code", | ||
"style", | ||
"syntax", | ||
"checking", | ||
"eslint", | ||
"config", | ||
"eslintconfig", | ||
"lint", | ||
"hint", | ||
"style", | ||
"syntax", | ||
"check", | ||
"typescript", | ||
@@ -33,6 +39,15 @@ "ts" | ||
"index.js", | ||
"typescript.js", | ||
"typescript-basic.js" | ||
"index.d.ts", | ||
"typescript.js" | ||
], | ||
"scripts": {} | ||
"scripts": {}, | ||
"peerDependencies": { | ||
"eslint": "9.x.x" | ||
}, | ||
"dependencies": { | ||
"@typescript-eslint/eslint-plugin": "8.x.x", | ||
"@typescript-eslint/parser": "8.x.x", | ||
"@stylistic/eslint-plugin": "2.x.x", | ||
"globals": "15.x.x" | ||
} | ||
} |
@@ -32,3 +32,2 @@ # Eslint Config Aether | ||
## Installation | ||
@@ -40,40 +39,9 @@ | ||
This package includes optional configurations for TypeScript which require the TypeScript ESLint [plugin](https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin) and [parser](https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/parser): | ||
```sh | ||
npm install @typescript-eslint/eslint-plugin | ||
npm install @typescript-eslint/parser | ||
``` | ||
## Included Configurations | ||
The `aether` configuration is intended to be used for JavaScript projects, `aether/typescript-basic` is a compatibility configuration for TypeScript projects and `aether/typescript` adds rules that rely on type checking. | ||
| Config | Parent Configs | | ||
|---------------------------|----------------------------------------------------------------------------------| | ||
| `aether` | `eslint:recommended` | | ||
| `aether/typescript` | `aether`, `plugin:@typescript-eslint/eslint-recommended-requiring-type-checking` | | ||
| `aether/typescript-basic` | `aether`, `plugin:@typescript-eslint/eslint-recommended` | | ||
## Usage | ||
Note: The config `aether/typescript` sets `parserOptions.project` to `"tsconfig.json"` by default. | ||
#### eslint.config.js | ||
#### package.json | ||
```json | ||
{ | ||
"eslintConfig": { | ||
"extends": "aether/typescript" | ||
} | ||
} | ||
```js | ||
import aether from "eslint-config-aether"; | ||
export default [...aether]; | ||
``` | ||
#### .eslintrc | ||
```json | ||
{ | ||
"extends": "aether/typescript" | ||
} | ||
``` |
@@ -1,55 +0,83 @@ | ||
module.exports = require("./typescript-basic.js"); | ||
import tsParser from "@typescript-eslint/parser"; | ||
import ts from "@typescript-eslint/eslint-plugin"; | ||
import stylistic from "@stylistic/eslint-plugin"; | ||
module.exports.extends.push( | ||
"plugin:@typescript-eslint/recommended-requiring-type-checking" | ||
); | ||
Object.assign(module.exports.rules, { | ||
"camelcase": "off", | ||
"no-underscore-dangle": "off", | ||
"@typescript-eslint/naming-convention": ["warn", | ||
{ | ||
"selector": "default", | ||
"format": ["camelCase"] | ||
}, | ||
{ | ||
"selector": ["import"], | ||
"format": ["camelCase", "PascalCase"] | ||
}, | ||
{ | ||
"selector": ["variable", "accessor"], | ||
"format": ["camelCase", "UPPER_CASE"] | ||
}, | ||
{ | ||
"selector": ["parameter", "property"], | ||
"format": ["camelCase"], | ||
"leadingUnderscore": "allow" | ||
}, | ||
{ | ||
"selector": "classProperty", | ||
"modifiers": ["static", "readonly"], | ||
"format": ["camelCase", "PascalCase", "UPPER_CASE"], | ||
"leadingUnderscore": "forbid" | ||
}, | ||
{ | ||
"selector": "typeLike", | ||
"format": ["PascalCase"] | ||
}, | ||
{ | ||
"selector": "enumMember", | ||
"format": ["UPPER_CASE"] | ||
}, | ||
{ | ||
"selector": ["objectLiteralProperty", "objectLiteralMethod"], | ||
"format": null | ||
}, | ||
{ | ||
"selector": "interface", | ||
"format": ["PascalCase"], | ||
"custom": { | ||
"regex": "^I[A-Z]", | ||
"match": false | ||
export default { | ||
"files": [ | ||
"**/*.ts", | ||
], | ||
"plugins": { | ||
"@typescript-eslint": ts, | ||
"@stylistic": stylistic, | ||
}, | ||
"languageOptions": { | ||
"parser": tsParser, | ||
"parserOptions": { | ||
"project": ["tsconfig.json"] | ||
} | ||
}, | ||
"rules": { | ||
...ts.configs["recommended-requiring-type-checking"].rules, | ||
...ts.configs["stylistic-type-checked"].rules, | ||
"camelcase": "off", | ||
"indent": "off", | ||
"no-undef": "off", | ||
"no-underscore-dangle": "off", | ||
"no-unused-vars": "off", | ||
"@stylistic/indent": ["warn", "tab", { | ||
"SwitchCase": 1 | ||
}], | ||
"@typescript-eslint/no-empty-function": "off", | ||
"@typescript-eslint/no-unused-vars": ["warn", { | ||
"vars": "all", | ||
"args": "none" | ||
}], | ||
"@typescript-eslint/prefer-optional-chain": "off", | ||
"@typescript-eslint/strict-boolean-expressions": "error", | ||
"@typescript-eslint/naming-convention": ["warn", | ||
{ | ||
"selector": "default", | ||
"format": ["camelCase"] | ||
}, | ||
{ | ||
"selector": ["import"], | ||
"format": ["camelCase", "PascalCase"] | ||
}, | ||
{ | ||
"selector": ["variable", "accessor"], | ||
"format": ["camelCase", "UPPER_CASE"] | ||
}, | ||
{ | ||
"selector": ["parameter", "property"], | ||
"format": ["camelCase"], | ||
"leadingUnderscore": "allow" | ||
}, | ||
{ | ||
"selector": "classProperty", | ||
"modifiers": ["static", "readonly"], | ||
"format": ["camelCase", "PascalCase", "UPPER_CASE"], | ||
"leadingUnderscore": "forbid" | ||
}, | ||
{ | ||
"selector": "typeLike", | ||
"format": ["PascalCase"] | ||
}, | ||
{ | ||
"selector": "enumMember", | ||
"format": ["UPPER_CASE"] | ||
}, | ||
{ | ||
"selector": ["objectLiteralProperty", "objectLiteralMethod"], | ||
"format": null | ||
}, | ||
{ | ||
"selector": "interface", | ||
"format": ["PascalCase"], | ||
"custom": { | ||
"regex": "^I[A-Z]", | ||
"match": false | ||
} | ||
} | ||
} | ||
] | ||
}); | ||
] | ||
} | ||
}; |
196
Yes
7340
5
46
+ Addedglobals@15.x.x
+ Added@eslint-community/eslint-utils@4.4.1(transitive)
+ Added@eslint-community/regexpp@4.12.1(transitive)
+ Added@eslint/config-array@0.19.1(transitive)
+ Added@eslint/core@0.10.0(transitive)
+ Added@eslint/eslintrc@3.2.0(transitive)
+ Added@eslint/js@9.18.0(transitive)
+ Added@eslint/object-schema@2.1.5(transitive)
+ Added@eslint/plugin-kit@0.2.5(transitive)
+ Added@humanfs/core@0.19.1(transitive)
+ Added@humanfs/node@0.16.6(transitive)
+ Added@humanwhocodes/module-importer@1.0.1(transitive)
+ Added@humanwhocodes/retry@0.3.10.4.1(transitive)
+ Added@nodelib/fs.scandir@2.1.5(transitive)
+ Added@nodelib/fs.stat@2.0.5(transitive)
+ Added@nodelib/fs.walk@1.2.8(transitive)
+ Added@stylistic/eslint-plugin@2.13.0(transitive)
+ Added@types/estree@1.0.6(transitive)
+ Added@types/json-schema@7.0.15(transitive)
+ Added@typescript-eslint/eslint-plugin@8.20.0(transitive)
+ Added@typescript-eslint/parser@8.20.0(transitive)
+ Added@typescript-eslint/scope-manager@8.20.0(transitive)
+ Added@typescript-eslint/type-utils@8.20.0(transitive)
+ Added@typescript-eslint/types@8.20.0(transitive)
+ Added@typescript-eslint/typescript-estree@8.20.0(transitive)
+ Added@typescript-eslint/utils@8.20.0(transitive)
+ Added@typescript-eslint/visitor-keys@8.20.0(transitive)
+ Addedacorn@8.14.0(transitive)
+ Addedacorn-jsx@5.3.2(transitive)
+ Addedajv@6.12.6(transitive)
+ Addedansi-styles@4.3.0(transitive)
+ Addedargparse@2.0.1(transitive)
+ Addedbalanced-match@1.0.2(transitive)
+ Addedbrace-expansion@1.1.112.0.1(transitive)
+ Addedbraces@3.0.3(transitive)
+ Addedcallsites@3.1.0(transitive)
+ Addedchalk@4.1.2(transitive)
+ Addedcolor-convert@2.0.1(transitive)
+ Addedcolor-name@1.1.4(transitive)
+ Addedconcat-map@0.0.1(transitive)
+ Addedcross-spawn@7.0.6(transitive)
+ Addeddebug@4.4.0(transitive)
+ Addeddeep-is@0.1.4(transitive)
+ Addedescape-string-regexp@4.0.0(transitive)
+ Addedeslint@9.18.0(transitive)
+ Addedeslint-scope@8.2.0(transitive)
+ Addedeslint-visitor-keys@3.4.34.2.0(transitive)
+ Addedespree@10.3.0(transitive)
+ Addedesquery@1.6.0(transitive)
+ Addedesrecurse@4.3.0(transitive)
+ Addedestraverse@5.3.0(transitive)
+ Addedesutils@2.0.3(transitive)
+ Addedfast-deep-equal@3.1.3(transitive)
+ Addedfast-glob@3.3.3(transitive)
+ Addedfast-json-stable-stringify@2.1.0(transitive)
+ Addedfast-levenshtein@2.0.6(transitive)
+ Addedfastq@1.18.0(transitive)
+ Addedfile-entry-cache@8.0.0(transitive)
+ Addedfill-range@7.1.1(transitive)
+ Addedfind-up@5.0.0(transitive)
+ Addedflat-cache@4.0.1(transitive)
+ Addedflatted@3.3.2(transitive)
+ Addedglob-parent@5.1.26.0.2(transitive)
+ Addedglobals@14.0.015.14.0(transitive)
+ Addedgraphemer@1.4.0(transitive)
+ Addedhas-flag@4.0.0(transitive)
+ Addedignore@5.3.2(transitive)
+ Addedimport-fresh@3.3.0(transitive)
+ Addedimurmurhash@0.1.4(transitive)
+ Addedis-extglob@2.1.1(transitive)
+ Addedis-glob@4.0.3(transitive)
+ Addedis-number@7.0.0(transitive)
+ Addedisexe@2.0.0(transitive)
+ Addedjs-yaml@4.1.0(transitive)
+ Addedjson-buffer@3.0.1(transitive)
+ Addedjson-schema-traverse@0.4.1(transitive)
+ Addedjson-stable-stringify-without-jsonify@1.0.1(transitive)
+ Addedkeyv@4.5.4(transitive)
+ Addedlevn@0.4.1(transitive)
+ Addedlocate-path@6.0.0(transitive)
+ Addedlodash.merge@4.6.2(transitive)
+ Addedmerge2@1.4.1(transitive)
+ Addedmicromatch@4.0.8(transitive)
+ Addedminimatch@3.1.29.0.5(transitive)
+ Addedms@2.1.3(transitive)
+ Addednatural-compare@1.4.0(transitive)
+ Addedoptionator@0.9.4(transitive)
+ Addedp-limit@3.1.0(transitive)
+ Addedp-locate@5.0.0(transitive)
+ Addedparent-module@1.0.1(transitive)
+ Addedpath-exists@4.0.0(transitive)
+ Addedpath-key@3.1.1(transitive)
+ Addedpicomatch@2.3.14.0.2(transitive)
+ Addedprelude-ls@1.2.1(transitive)
+ Addedpunycode@2.3.1(transitive)
+ Addedqueue-microtask@1.2.3(transitive)
+ Addedresolve-from@4.0.0(transitive)
+ Addedreusify@1.0.4(transitive)
+ Addedrun-parallel@1.2.0(transitive)
+ Addedsemver@7.6.3(transitive)
+ Addedshebang-command@2.0.0(transitive)
+ Addedshebang-regex@3.0.0(transitive)
+ Addedstrip-json-comments@3.1.1(transitive)
+ Addedsupports-color@7.2.0(transitive)
+ Addedto-regex-range@5.0.1(transitive)
+ Addedts-api-utils@2.0.0(transitive)
+ Addedtype-check@0.4.0(transitive)
+ Addedtypescript@5.7.3(transitive)
+ Addeduri-js@4.4.1(transitive)
+ Addedwhich@2.0.2(transitive)
+ Addedword-wrap@1.2.5(transitive)
+ Addedyocto-queue@0.1.0(transitive)