-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit e17f0d1
Showing
12 changed files
with
1,867 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "./index.js" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
*.js text eol=lf | ||
*.json text eol=lf | ||
*.md text eol=lf | ||
*.yml text eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: npm | ||
directory: '/' | ||
schedule: | ||
interval: weekly | ||
time: '00:00' | ||
commit-message: | ||
prefix: fix | ||
prefix-development: chore | ||
include: scope | ||
- package-ecosystem: github-actions | ||
directory: '/' | ||
schedule: | ||
interval: daily | ||
time: '00:00' | ||
commit-message: | ||
prefix: fix | ||
prefix-development: chore | ||
include: scope |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Always validate the PR title AND all the commits | ||
#titleAndCommits: true | ||
# Allows use of Merge commits (eg on github: "Merge branch 'master' into feature/ride-unicorns") | ||
# this is only relevant when using commitsOnly: true (or titleAndCommits: true) | ||
allowMergeCommits: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
paths-ignore: | ||
- "*.md" | ||
- "LICENSE" | ||
pull_request: | ||
branches: | ||
- master | ||
paths-ignore: | ||
- "*.md" | ||
- "LICENSE" | ||
|
||
jobs: | ||
ci: | ||
name: Check linting | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@master | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 12.x | ||
cache: yarn | ||
registry-url: "https://registry.npmjs.org/" | ||
|
||
- name: Install yarn dependencies | ||
run: yarn install --frozen-lockfile --non-interactive | ||
|
||
- name: Run linter | ||
run: yarn run lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
# Created by .ignore support plugin (hsz.mobi) | ||
### Node template | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
tsconfig.tsbuildinfo* | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# TypeScript v1 declaration files | ||
typings/ | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
|
||
# TypeScript compiler output | ||
dist | ||
*.tsbuildinfo | ||
|
||
# Minimized output | ||
*.min.js | ||
|
||
# parcel-bundler cache (https://parceljs.org/) | ||
.cache | ||
|
||
# next.js build output | ||
.next | ||
|
||
# nuxt.js build output | ||
.nuxt | ||
|
||
# vuepress build output | ||
.vuepress/dist | ||
|
||
# Serverless directories | ||
.serverless | ||
|
||
# IDE / Editor | ||
.idea | ||
.vscode | ||
|
||
# Service worker | ||
sw.* | ||
|
||
# Mac OSX | ||
.DS_Store | ||
|
||
# Vim swap files | ||
*.swp | ||
|
||
# Syncthing | ||
.stfolder/ | ||
.stignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
MIT License | ||
|
||
Copyright (c) 2021 JeDaYoshi | ||
|
||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# @cryb/eslint-config | ||
|
||
*\- shared ESLint config for Cryb projects* | ||
|
||
This package contains ESLint rules which are shared through Cryb components. | ||
It includes all required dependencies by default, but has `eslint@7` and `typescript` as peer dependencies. | ||
|
||
Rules are based of `eslint-config-standard-with-typescript` and `eslint-plugin-jsdoc`, | ||
with Cryb's code style applied in. You can read more about it [here](https://github.com/crybapp/library/blob/master/code-style/README.md). | ||
|
||
## License | ||
|
||
MIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
module.exports = { | ||
extends: [ | ||
'standard-with-typescript', | ||
'plugin:jsdoc/recommended' | ||
], | ||
plugins: [ | ||
'jsdoc', | ||
'prefer-arrow' | ||
], | ||
rules: { | ||
// we prefer using arrow functions | ||
'prefer-arrow/prefer-arrow-functions': 'error', | ||
|
||
// arg => arg is better than (arg) => arg! | ||
'arrow-parens': ['error', 'as-needed'], | ||
|
||
// lines should generally be kept short but definitely shouldn't be over 120 characters | ||
// allow long strings and regexes though | ||
'max-len': ['error', { | ||
code: 120, | ||
ignoreUrls: true, | ||
ignoreStrings: true, | ||
ignoreTemplateLiterals: true, | ||
ignoreRegExpLiterals: true | ||
}], | ||
|
||
// console.log is fine | ||
'no-console': 'off', | ||
|
||
// no var. use `const` or `let`. | ||
'no-var': 'error', | ||
|
||
// we only are interested on Unix newlines | ||
'linebreak-style': ['error', 'unix'], | ||
|
||
// chained calls should be readable | ||
'newline-per-chained-call': ['error', { ignoreChainWithDepth: 2 }], | ||
|
||
// imports should be sorted out | ||
'sort-imports': ['error', { | ||
ignoreCase: false, | ||
ignoreDeclarationSort: true, | ||
ignoreMemberSort: false, | ||
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'], | ||
allowSeparatedGroups: true | ||
}], | ||
|
||
// empty lines aren't nice unless needed | ||
'no-multiple-empty-lines': ['error', { max: 1, maxBOF: 0, maxEOF: 0 }], | ||
|
||
// we want === whether possible, except in cases like when we compare to null | ||
eqeqeq: ['error', 'smart'], | ||
|
||
// descriptions on params and return is often redundant | ||
'jsdoc/require-param-description': 'off', | ||
'jsdoc/require-returns-description': 'off', | ||
|
||
// not everything needs to be a complete sentence | ||
'jsdoc/require-description-complete-sentence': 'off', | ||
|
||
// most things explain themselves | ||
'jsdoc/require-example': 'off', | ||
|
||
// don't worry about whether a newline exists after jsdoc description | ||
'jsdoc/newline-after-description': 'off' | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"name": "@cryb/eslint-config", | ||
"version": "1.0.0", | ||
"description": "Shared ESLint config for Cryb projects", | ||
"author": "JeDaYoshi <hi@jeda.im>", | ||
"homepage": "https://github.com/crybapp/eslint-config", | ||
"license": "MIT", | ||
"main": "index.js", | ||
"scripts": { | ||
"lint": "eslint index.js", | ||
"lint:fix": "eslint --fix index.js" | ||
}, | ||
"files": [ | ||
"index.js" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/crybapp/eslint-config.git" | ||
}, | ||
"bugs": "https://github.com/crybapp/eslint-config/issues", | ||
"dependencies": { | ||
"@typescript-eslint/eslint-plugin": "^4.33.0", | ||
"@typescript-eslint/parser": "^4.33.0", | ||
"eslint-config-standard-with-typescript": "^21.0.1", | ||
"eslint-plugin-import": "^2.25.2", | ||
"eslint-plugin-jsdoc": "^36.1.1", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint-plugin-prefer-arrow": "^1.2.3", | ||
"eslint-plugin-promise": "^5.1.0" | ||
}, | ||
"devDependencies": { | ||
"eslint": "7.32.0", | ||
"typescript": "4.4.4" | ||
}, | ||
"peerDependencies": { | ||
"eslint": "^7.12.1", | ||
"typescript": "*" | ||
}, | ||
"keywords": [ | ||
"cryb", | ||
"eslint", | ||
"eslintconfig", | ||
"internal" | ||
] | ||
} |
Oops, something went wrong.