|
| 1 | +{ |
| 2 | + "root": true, |
| 3 | + "env": { |
| 4 | + "node": true, |
| 5 | + "es2022": true |
| 6 | + }, |
| 7 | + "parserOptions": { |
| 8 | + "sourceType": "module" |
| 9 | + }, |
| 10 | + "extends": "eslint:recommended", |
| 11 | + "rules": { |
| 12 | + "brace-style": ["warn", "stroustrup", { "allowSingleLine": true }], |
| 13 | + "func-call-spacing": ["warn", "never"], |
| 14 | + "indent": ["warn", "tab", { "ignoredNodes": ["TemplateLiteral *"], "SwitchCase": 1 }], |
| 15 | + "linebreak-style": ["warn", "unix"], |
| 16 | + "no-console": ["warn", { "allow": ["warn", "error"] }], |
| 17 | + "quotes": ["warn", "double"], |
| 18 | + "semi": ["warn", "always"], |
| 19 | + "space-before-blocks": ["warn", "always"] |
| 20 | + }, |
| 21 | + "overrides": [ |
| 22 | + { |
| 23 | + "files": ["*.json"], |
| 24 | + "parser": "jsonc-eslint-parser", |
| 25 | + "extends": ["plugin:jsonc/recommended-with-jsonc"], |
| 26 | + }, |
| 27 | + { |
| 28 | + "files": ["package.json"], |
| 29 | + "parser": "jsonc-eslint-parser", |
| 30 | + "rules": { |
| 31 | + "jsonc/sort-keys": [ |
| 32 | + "warn", |
| 33 | + { |
| 34 | + "pathPattern": "^$", |
| 35 | + "order": [ |
| 36 | + "$schema", |
| 37 | + "private", |
| 38 | + "name", |
| 39 | + "version", |
| 40 | + "description", |
| 41 | + "license", |
| 42 | + "author", |
| 43 | + "maintainers", |
| 44 | + "contributors", |
| 45 | + "homepage", |
| 46 | + "repository", |
| 47 | + "bugs", |
| 48 | + "type", |
| 49 | + "exports", |
| 50 | + "main", |
| 51 | + "module", |
| 52 | + "browser", |
| 53 | + "man", |
| 54 | + "preferGlobal", |
| 55 | + "bin", |
| 56 | + "files", |
| 57 | + "directories", |
| 58 | + "scripts", |
| 59 | + "config", |
| 60 | + "sideEffects", |
| 61 | + "types", |
| 62 | + "typings", |
| 63 | + "workspaces", |
| 64 | + "resolutions", |
| 65 | + "dependencies", |
| 66 | + "bundleDependencies", |
| 67 | + "bundledDependencies", |
| 68 | + "peerDependencies", |
| 69 | + "peerDependenciesMeta", |
| 70 | + "optionalDependencies", |
| 71 | + "devDependencies", |
| 72 | + "keywords", |
| 73 | + "engines", |
| 74 | + "engineStrict", |
| 75 | + "os", |
| 76 | + "cpu", |
| 77 | + "publishConfig" |
| 78 | + ] |
| 79 | + }, |
| 80 | + { |
| 81 | + "pathPattern": "^repository$", |
| 82 | + "order": ["type", "url", "directory"] |
| 83 | + }, |
| 84 | + { |
| 85 | + "pathPattern": "^spectrum$", |
| 86 | + "order": { "type": "asc" } |
| 87 | + }, |
| 88 | + { |
| 89 | + "pathPattern": "^exports$", |
| 90 | + "order": ["."] |
| 91 | + }, |
| 92 | + { |
| 93 | + "pathPattern": ".*", |
| 94 | + "order": { "type": "asc" } |
| 95 | + } |
| 96 | + ] |
| 97 | + } |
| 98 | + } |
| 99 | + ] |
| 100 | +} |
0 commit comments