1
mirror of https://github.com/jakejarvis/eslint-config.git synced 2025-04-28 06:50:30 -04:00

Compare commits

...

27 Commits
v1.0.0 ... main

Author SHA1 Message Date
29be6e9c26
lint again 2025-01-16 10:47:56 -05:00
5ed0ff58f6
fix operator-linebreak again 2025-01-16 10:47:06 -05:00
b5c20f22a2
lint the linter config 2025-01-16 10:43:53 -05:00
a56231d6a4
fix operator-linebreak 2025-01-16 10:43:11 -05:00
ed541485b3
fix some rules 2025-01-16 10:41:11 -05:00
fcb55a20bd
remove languageOptions 2025-01-16 10:11:19 -05:00
86a3091d71
add missing "type": "module" 2025-01-16 09:15:28 -05:00
64cdd08b12
eslint 9.x compatibility 2025-01-16 09:12:29 -05:00
f97840fbd8
v3.1.0 2022-05-10 20:05:58 -04:00
58062a0bc0
remove optional peerDependencies 2022-05-10 20:01:37 -04:00
cbe2b1e5fa
v3.0.0 2021-11-17 14:17:43 -05:00
9ba98bac80
bump plugin versions 2021-11-17 12:04:39 -05:00
02f185c144
v2.0.0 2021-10-12 20:00:30 -04:00
98810d0f43
make plugin-compat/import optional peer deps 2021-10-12 19:59:00 -04:00
13a3f2a128
1.1.1 2021-10-12 19:51:41 -04:00
673ac6003d
don't commit yarn.lock 2021-10-12 19:48:48 -04:00
15176a732a
v1.1.0 2021-10-12 14:20:26 -04:00
aeb4adad4d
eslint 8 fixes 2021-10-12 14:16:15 -04:00
5f2cd50ec7
v1.0.4 2021-09-10 10:14:53 -04:00
7b00cc660b
turn compat/compat off globally, override in browser-targeted projects 2021-09-10 10:13:50 -04:00
579eb4fa56
update readme 2021-08-31 12:17:50 -04:00
716a5f7559
v1.0.3 2021-08-30 23:15:04 -04:00
0782ebe868
revert typescript rules (for now) 2021-08-30 23:14:51 -04:00
4c7d1c6f54
v1.0.2 2021-08-30 23:10:42 -04:00
df5e305100
add typescript overrides, change quote-props to consistent-as-needed 2021-08-30 23:10:15 -04:00
2d0d511552
v1.0.1 2021-08-30 13:21:45 -04:00
018f036e80
edit curly rule 2021-08-30 13:21:26 -04:00
6 changed files with 1192 additions and 1541 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
node_modules/
package-lock.json

View File

@ -5,7 +5,7 @@
## Installation
```bash
yarn add --dev eslint @jakejarvis/eslint-config eslint-plugin-compat eslint-plugin-import
yarn add --dev eslint "@jakejarvis/eslint-config@*"
```
## Usage
@ -15,8 +15,12 @@ yarn add --dev eslint @jakejarvis/eslint-config eslint-plugin-compat eslint-plug
```json5
{
"extends": [
"@jakejarvis"
"@jakejarvis/eslint-config"
],
"env": {
"browser": true,
"node": true
},
"rules": {
// Project-specific overrides...
}

199
index.js
View File

@ -1,101 +1,104 @@
module.exports = {
extends: [
"eslint:recommended",
"plugin:compat/recommended",
"plugin:import/recommended",
],
parserOptions: {
sourceType: "module",
ecmaVersion: 2018,
ecmaFeatures: {
"jsx": true,
},
},
env: {
"es6": true,
},
export default [{
rules: {
// Stylistic:
"brace-style": "error",
"camelcase": ["error", {
"properties": "never",
"ignoreDestructuring": true,
}],
"comma-dangle": ["error", "always-multiline"],
"comma-spacing": "error",
"comma-style": "error",
"curly": ["error", "multi-or-nest", "consistent"],
"func-call-spacing": "error",
"max-len": ["warn", {
"code": 120,
"tabWidth": 2,
"ignoreUrls": true,
"ignoreComments": false,
"ignoreStrings": true,
"ignoreRegExpLiterals": true,
"ignoreTemplateLiterals": true,
}],
"no-multiple-empty-lines": ["error", { "max": 1 }],
"no-tabs": "error",
"no-trailing-spaces": "error",
"object-curly-spacing": ["error", "always"],
"one-var": ["error", {
"var": "never",
"let": "never",
"const": "never",
}],
"operator-linebreak": ["error", "after"],
"padded-blocks": ["error", "never"],
"quote-props": ["error", "consistent"],
"quotes": ["error", "double", {
"avoidEscape": true,
"allowTemplateLiterals": true,
}],
"semi": "error",
"semi-spacing": "error",
"space-before-blocks": "error",
"space-before-function-paren": ["error", {
"named": "never",
"anonymous": "always",
"asyncArrow": "always",
}],
"spaced-comment": ["error", "always", {
"line": {
"markers": ["/"],
"exceptions": ["-", "+"],
},
"block": {
"markers": ["!"],
"exceptions": ["*"],
"balanced": true,
},
}],
"template-tag-spacing": ["error", "never"],
"brace-style": "error",
// ES6:
"arrow-body-style": ["error", "as-needed", {
"requireReturnForObjectLiteral": false,
}],
"arrow-parens": ["error", "always"],
"arrow-spacing": ["error", { "before": true, "after": true }],
"no-confusing-arrow": ["error", { "allowParens": true }],
"no-var": "error",
"prefer-const": ["error", {
"destructuring": "any",
"ignoreReadBeforeAssign": true,
}],
"prefer-destructuring": ["error", {
"VariableDeclarator": {
"array": false,
"object": true,
},
"AssignmentExpression": {
"array": true,
"object": false,
},
}],
"prefer-rest-params": "error",
"prefer-spread": "error",
"template-curly-spacing": "error",
camelcase: ["error", {
properties: "never",
ignoreDestructuring: true,
}],
"comma-dangle": ["error", {
arrays: "always-multiline",
objects: "always-multiline",
imports: "always-multiline",
exports: "always-multiline",
functions: "never",
}],
"comma-spacing": "error",
"comma-style": "error",
curly: ["error", "multi-line"],
"func-call-spacing": "error",
"no-multiple-empty-lines": ["error", {
max: 1,
}],
"no-tabs": "error",
"no-trailing-spaces": "error",
"object-curly-spacing": ["error", "always"],
"one-var": ["error", {
var: "never",
let: "never",
const: "never",
}],
"operator-linebreak": ["error", "after", { overrides: { "?": "before", ":": "before" } }],
"padded-blocks": ["error", "never"],
"quote-props": ["error", "as-needed"],
quotes: ["error", "double", {
avoidEscape: true,
allowTemplateLiterals: true,
}],
semi: "error",
"semi-spacing": "error",
"space-before-blocks": "error",
"space-before-function-paren": ["error", {
named: "never",
anonymous: "always",
asyncArrow: "always",
}],
"spaced-comment": ["error", "always", {
line: {
markers: ["/"],
exceptions: ["-", "+"],
},
block: {
markers: ["!"],
exceptions: ["*"],
balanced: true,
},
}],
"template-tag-spacing": ["error", "never"],
"arrow-parens": ["error", "always"],
"arrow-spacing": ["error", {
before: true,
after: true,
}],
"no-confusing-arrow": ["error", {
allowParens: true,
}],
"no-var": "error",
"prefer-const": ["error", {
destructuring: "any",
ignoreReadBeforeAssign: true,
}],
"prefer-destructuring": ["error", {
VariableDeclarator: {
array: false,
object: true,
},
AssignmentExpression: {
array: true,
object: false,
},
}],
"prefer-rest-params": "error",
"prefer-spread": "error",
"template-curly-spacing": "error",
},
};
}];

1076
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,46 +1,30 @@
{
"name": "@jakejarvis/eslint-config",
"version": "1.0.0",
"description": "@jakejarvis's shared eslint config.",
"version": "4.0.7",
"description": "My ESLint config. Inspired heavily by eslint-config-google and moderately by eslint-config-airbnb.",
"license": "MIT",
"repository": "jakejarvis/eslint-config",
"author": {
"name": "Jake Jarvis",
"email": "jake@jarv.is",
"url": "https://jarv.is/"
},
"repository": {
"type": "git",
"url": "https://github.com/jakejarvis/eslint-config.git"
},
"main": "index.js",
"files": [
"index.js"
],
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint --fix ."
},
"dependencies": {},
"main": "index.js",
"type": "module",
"devDependencies": {
"eslint": "^7.32.0",
"eslint-plugin-compat": "^3.13.0",
"eslint-plugin-import": "^2.24.2"
"eslint": "^9.4.0"
},
"peerDependencies": {
"eslint": "^7.32.0",
"eslint-plugin-compat": "^3.13.0",
"eslint-plugin-import": "^2.24.2"
},
"eslintConfig": {
"extends": "./index.js",
"env": {
"node": true
}
"eslint": "^7 || ^8 || >=9"
},
"keywords": [
"javascript",
"ecmascript",
"eslint",
"eslint-config",
"lint",
"config"
]

1417
yarn.lock

File diff suppressed because it is too large Load Diff