This commit is contained in:
Chase 2022-04-20 14:40:09 -05:00
commit 542da0e496
Signed by: chase
GPG Key ID: 9EC29E797878008C
14 changed files with 3951 additions and 0 deletions

4
.eslintignore Normal file
View File

@ -0,0 +1,4 @@
.vscode
.github
node_modules
package-lock.json

3
.eslintrc Normal file
View File

@ -0,0 +1,3 @@
{
"extends": "./index.js"
}

1
.gitattributes vendored Normal file
View File

@ -0,0 +1 @@
* text=auto eol=lf

12
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,12 @@
---
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
open-pull-requests-limit: 10

15
.github/workflows/auto-merge.yml vendored Normal file
View File

@ -0,0 +1,15 @@
name: "📦️ Auto Merge Dependency Updates"
on:
- pull_request_target
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: tjenkinson/gh-action-auto-merge-dependency-updates@v1
with:
allowed-actors: dependabot[bot]
allowed-update-types: devDependencies:minor, devDependencies:patch, devDependencies:major, dependencies:minor, dependencies:patch, dependencies:major
merge-method: squash
repo-token: ${{ secrets.GITHUB_TOKEN }}

25
.github/workflows/linter.yml vendored Normal file
View File

@ -0,0 +1,25 @@
---
name: "🎨 Lint"
on:
push:
branches: [master, main]
pull_request:
branches: [master, main]
jobs:
lint:
runs-on: ubuntu-latest
if: github.actor != 'dependabot[bot]' && !contains(github.event.head_commit.message, '[skip lint]')
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: "📦️ Install Dependencies"
run: |
npm install
- name: "🎨 ESLint"
run: npx eslint . --ext .js,.jsx,.ts,.tsx

6
.gitignore vendored Normal file
View File

@ -0,0 +1,6 @@
# Packages
node_modules/
# Misc
*.bak
.DS_Store

7
.vscode/extensions.json vendored Normal file
View File

@ -0,0 +1,7 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"github.vscode-pull-request-github",
"eamodio.gitlens"
]
}

14
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,14 @@
{
"javascript.format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": true,
"javascript.format.placeOpenBraceOnNewLineForControlBlocks": true,
"javascript.format.placeOpenBraceOnNewLineForFunctions": true,
"editor.formatOnPaste": true,
"editor.formatOnSave": true,
"editor.formatOnType": true,
"editor.detectIndentation": false,
"editor.tabSize": 4,
"files.eol": "\n",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}

21
LICENSE.md Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2022 Chase
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

14
README.md Normal file
View File

@ -0,0 +1,14 @@
<div align="center">
<h1>ESLint Config<br>
<a href="https://github.com/ChxseH/eslint-config/blob/master/LICENSE.md"><img alt="GitHub license" src="https://img.shields.io/github/license/ChxseH/eslint-config"></a>
<a href="https://github.com/ChxseH/eslint-config/stargazers"><img alt="GitHub stars" src="https://img.shields.io/github/stars/ChxseH/eslint-config"></a>
<a href="https://github.com/ChxseH/eslint-config/issues"><img alt="GitHub issues" src="https://img.shields.io/github/issues/ChxseH/eslint-config"></a>
<a href="https://github.com/ChxseH/eslint-config/network"><img alt="GitHub forks" src="https://img.shields.io/github/forks/ChxseH/eslint-config"></a>
<a href="https://github.com/ChxseH/eslint-config/actions/workflows/linter.yml"><img alt="GitHub Actions Status" src="https://github.com/ChxseH/eslint-config/actions/workflows/linter.yml/badge.svg"></a>
</h1></div>
## Installation
```bash
```

112
index.js Normal file
View File

@ -0,0 +1,112 @@
// eslint-disable-next-line unicorn/prefer-module
module.exports = {
extends: [
`eslint:recommended`,
`plugin:unicorn/recommended`,
`plugin:jsdoc/recommended`,
`airbnb-base`
],
plugins: [
`unicorn`,
`jsdoc`
],
rules: {
"no-unused-vars": `error`,
"no-redeclare": `off`,
quotes: [
`error`,
`backtick`
],
camelcase: [
`error`,
{
properties: `always`
}
],
indent: [
`error`,
4,
{
SwitchCase: 1
}
],
"max-len": [
`error`,
{
code: 160,
ignoreUrls: true,
ignoreComments: true,
ignoreStrings: true,
ignoreTemplateLiterals: true
}
],
"no-console": `off`,
"no-restricted-syntax": [
`error`,
{
selector: `CallExpression[callee.object.name='console'][callee.property.name!=/^(log|warn|error|info|trace)$/]`,
message: `Unexpected property on console object was called`
}
],
"brace-style": [
`error`,
`allman`,
{
allowSingleLine: true
}
],
"template-curly-spacing": [
`error`,
`always`
],
"no-use-before-define": `off`,
"comma-dangle": `off`,
"consistent-return": `off`,
curly: [
`error`,
`multi-or-nest`
],
"nonblock-statement-body-position": `off`,
"vars-on-top": `off`,
"no-plusplus": [
`error`,
{
allowForLoopAfterthoughts: true
}
],
"no-await-in-loop": `off`,
"no-shadow": `off`,
"no-var": `off`,
"no-loop-func": `off`,
"func-names": `off`,
"prefer-destructuring": `off`,
"block-scoped-var": `off`,
"no-param-reassign": `off`,
"no-multiple-empty-lines": [
`error`,
{
max: 1,
maxBOF: 0,
maxEOF: 1
}
],
"padded-blocks": [
`error`,
`never`
],
"default-case": `off`,
"import/extensions": [
`error`,
`ignorePackages`,
{
js: `always`
}
],
"import/no-unresolved": `off`,
"unicorn/no-process-exit": `off`,
"unicorn/filename-case": `off`
},
};

3682
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

35
package.json Normal file
View File

@ -0,0 +1,35 @@
{
"name": "eslint-config-chase",
"version": "1.0.0",
"description": "Personal ESLint Config",
"main": "index.js",
"scripts": {
"lint": "eslint --fix --ext .js ."
},
"author": "Chase <c@chse.dev> (https://chse.dev)",
"license": "MIT",
"homepage": "https://github.com/chxseh/eslint-config",
"keywords": [
"eslint"
],
"repository": {
"type": "git",
"url": "https://github.com/chxseh/eslint-config.git"
},
"dependencies": {
"eslint-plugin-import": "^2.26.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-plugin-jsdoc": "^39.2.3",
"eslint-plugin-unicorn": "^42.0.0"
},
"peerDependencies": {
"eslint": "^8.13.0",
"eslint-plugin-import": "^2.26.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-plugin-jsdoc": "^39.2.3",
"eslint-plugin-unicorn": "^42.0.0"
},
"devDependencies": {
"eslint": "^8.13.0"
}
}