-
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 c9c4cd3
Showing
15 changed files
with
5,916 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,3 @@ | ||
{ | ||
"extends": "./src/node" | ||
} |
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,14 @@ | ||
# This is a comment. | ||
# Each line is a file pattern followed by one or more owners. | ||
|
||
# These owners will be the default owners for everything in | ||
# the repo. Unless a later match takes precedence, | ||
# @global-owner1 and @global-owner2 will be requested for | ||
# review when someone opens a pull request. | ||
|
||
|
||
# Order is important; the last matching pattern takes the most | ||
# precedence. When someone opens a pull request that only | ||
# modifies JS files, only @js-owner and not the global | ||
# owner(s) will be requested for a review. | ||
|
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,38 @@ | ||
name: Pull Request | ||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
markdown-lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '16.x' | ||
- run: npx markdownlint-cli2 "**/*.{md,markdown}" | ||
|
||
commit-lint: | ||
name: conventional-commits-lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: check-for-conventional-commits | ||
id: check-for-cc | ||
uses: agenthunt/conventional-commit-checker-action@v1.0.0 | ||
with: | ||
pr-body-regex: (.*\n)?(.*) | ||
|
||
code-lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '16.x' | ||
- run: npm i | ||
- run: npm 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,20 @@ | ||
name: Release & Publish | ||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '16.x' | ||
registry-url: 'https://npm.pkg.github.com' | ||
- run: npm ci | ||
- run: npx semantic-release | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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 @@ | ||
node_modules/ |
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,8 @@ | ||
{ | ||
"ignores": [ | ||
".github/CODEOWNERS" | ||
], | ||
"config": { | ||
"MD013": 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,7 @@ | ||
{ | ||
"recommendations": [ | ||
"davidanson.vscode-markdownlint", | ||
"streetsidesoftware.code-spell-checker", | ||
"dbaeumer.vscode-eslint" | ||
] | ||
} |
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,29 @@ | ||
{ | ||
"[markdown]": { | ||
"editor.formatOnPaste": true, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.markdownlint": true | ||
} | ||
}, | ||
|
||
"[typescript][javascript][typescriptreact][javascriptreact]": { | ||
"editor.formatOnSave": false, | ||
}, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": true, | ||
}, | ||
"editor.insertSpaces": true, | ||
"editor.tabSize": 2, | ||
"editor.detectIndentation": false, | ||
"cSpell.words": [ | ||
"agenthunt", | ||
"Atlassian", | ||
"devs", | ||
"Giflow", | ||
"iaac", | ||
"MADR", | ||
"markdownlint", | ||
"npm", | ||
"sonarjs" | ||
] | ||
} |
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,72 @@ | ||
# arcticShadows ESLint Config | ||
|
||
[![semantic-release: angular](https://img.shields.io/badge/semantic--release-angular-e10079?logo=semantic-release)](https://github.com/semantic-release/semantic-release) | ||
![example workflow](https://github.com/arcticshadow/eslint-config/actions/workflows/release-publish.yml/badge.svg) | ||
|
||
## Contributing | ||
|
||
If you would like to contribute to this base config - please open a PR. | ||
|
||
This project uses semantic-release to orchestrate Release time activities. Its all managed autonomously when code is merged to master | ||
|
||
## Using | ||
|
||
### Install | ||
|
||
```sh | ||
npm i -D @arcticshadow/eslint-config | ||
``` | ||
|
||
n.b. Install not working? You may need to auth your npm to github (instructions to come) | ||
|
||
You will need to ensure that you install the peer dependencies. If you install with npm>=7 this should be taken care of for you. | ||
|
||
A Note on Peer Dependencies - The version requirements of dependencies are intentionally left open - but you should ensure that the following conditions are met in your project: | ||
|
||
* It is important that you use the same version number for @typescript-eslint/parser and @typescript-eslint/eslint-plugin. | ||
|
||
Then add it to your config file | ||
|
||
```json | ||
//.eslintrc | ||
{ | ||
"extends": "@arcticshadow", | ||
|
||
// Or - for a browser project | ||
"extends": "arcticshadow/eslint-config/src/browser", | ||
|
||
// Or - for a backend/node project | ||
"extends": "@arcticshadow/eslint-config/src/node" | ||
|
||
// Or - for a react native project | ||
"extends": "@arcticshadow/eslint-config/src/react-native" | ||
} | ||
``` | ||
|
||
To enable all rules of this plugin, use @typescript-eslint/parser as a parser for ESLint (this is correctly set for you out of the box) and set the [parserOptions.project](https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/parser#parseroptionsproject) option. Thanks to it, type information is available, which is beneficial or even essential for some rules. | ||
|
||
### Optional for VSCode | ||
|
||
1. Install the `eslint` extension from Microsoft | ||
2. Add the eslint package to your `.vscode/extensions.json` file so other devs get suggested it automatically. | ||
3. Update your workspace settings `.vscode/settings.json` to include the following | ||
|
||
```jsonc | ||
{ | ||
// Disable any formatters provided by vscode extensions for ts/js files | ||
// This is a brute-force approach as we don't know what extensions you have, or how they may conflict. | ||
"[typescript][javascript][typescriptreact][javascriptreact]": { | ||
"editor.formatOnSave": false, | ||
}, | ||
"editor.codeActionsOnSave": { | ||
// Tell the Eslint plugin to 'fix' all on save. This eslint config provides a prettier plugin - so | ||
// ts/js formatting is taken care of. | ||
"source.fixAll.eslint": true, | ||
}, | ||
// The following are setting defaults that align to how prettier formats the code. These settings are | ||
// used in various ways by vscode. | ||
"editor.insertSpaces": true, | ||
"editor.tabSize": 2, | ||
"editor.detectIndentation": false, | ||
} | ||
``` |
Oops, something went wrong.