This repository has been archived by the owner on Sep 8, 2021. It is now read-only.
-
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.
Merge pull request #37 from guardian/add-eslint-config
Add eslint config
- Loading branch information
Showing
15 changed files
with
1,812 additions
and
338 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 |
---|---|---|
@@ -1,16 +1,28 @@ | ||
; This file is for unifying the coding style for different editors and IDEs | ||
; See editorconfig.org | ||
# based on https://github.com/guardian/configs/blob/main/.editorconfig | ||
|
||
; top-most EditorConfig file | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
# For [accessibility reasons](https://alexandersandberg.com/tabs-for-accessibility/) | ||
indent_style = tab | ||
indent_size = 4 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[package.json] | ||
indent_size = 2 | ||
# `npm` autoformats `package.json` every time you install a new dependency. | ||
indent_size = 2 | ||
|
||
# Because `yml` | ||
[*.yml] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[*.md] | ||
# Using tabs to indent pre-formatted code in markdown makes the spacing too extreme | ||
# when rendered on GitHub, so we revert back to spaces here. | ||
indent_style = space | ||
indent_size = 4 |
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 @@ | ||
{ | ||
"root": true, | ||
"env": { | ||
"jest": true, | ||
"browser": true, | ||
"node": true | ||
}, | ||
"parserOptions": { | ||
"sourceType": "module" | ||
}, | ||
"extends": ["@guardian/eslint-config-typescript"], | ||
"ignorePatterns": ["/dist"] | ||
} |
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,26 @@ | ||
name: CI | ||
on: push | ||
|
||
jobs: | ||
lint: | ||
name: Linting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
|
||
# based on https://github.com/actions/setup-node/issues/32#issuecomment-539794249 | ||
- name: Read .nvmrc | ||
run: echo ::set-output name=NVMRC::$(cat .nvmrc) | ||
id: nvm | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v2.1.2 | ||
with: | ||
node-version: '${{ steps.nvm.outputs.NVMRC }}' | ||
|
||
- name: Install dependencies | ||
uses: bahmutov/npm-install@v1 | ||
|
||
- name: Lint files | ||
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 @@ | ||
14.15.0 |
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 @@ | ||
"@guardian/prettier" |
Oops, something went wrong.