forked from bitwarden/clients
-
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.
[EC-183] Move eslint and prettier to project root (bitwarden#2536)
- Loading branch information
Showing
19 changed files
with
5,363 additions
and
2,249 deletions.
There are no files selected for viewing
File renamed without changes.
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 @@ | ||
**/build | ||
**/jslib | ||
**/webpack.config.js | ||
**/karma.conf.js | ||
**/gulpfile.js | ||
apps/browser/src/content/autofill.js | ||
apps/browser/src/scripts/duo.js | ||
|
||
**/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,55 @@ | ||
{ | ||
"root": true, | ||
"env": { | ||
"browser": true, | ||
"webextensions": true | ||
}, | ||
"plugins": ["@typescript-eslint"], | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:import/recommended", | ||
"plugin:import/typescript", | ||
"prettier" | ||
], | ||
"rules": { | ||
"@typescript-eslint/no-explicit-any": "off", // TODO: This should be re-enabled | ||
"@typescript-eslint/no-unused-vars": ["warn", { "args": "none" }], | ||
"@typescript-eslint/explicit-member-accessibility": [ | ||
"error", | ||
{ | ||
"accessibility": "no-public" | ||
} | ||
], | ||
"@typescript-eslint/no-this-alias": [ | ||
"error", | ||
{ | ||
"allowedNames": ["self"] | ||
} | ||
], | ||
"no-console": "warn", | ||
"import/no-unresolved": "off", // TODO: Look into turning off once each package is an actual package. | ||
"import/order": [ | ||
"error", | ||
{ | ||
"alphabetize": { | ||
"order": "asc" | ||
}, | ||
"newlines-between": "always", | ||
"pathGroups": [ | ||
{ | ||
"pattern": "jslib-*/**", | ||
"group": "external", | ||
"position": "after" | ||
}, | ||
{ | ||
"pattern": "src/**/*", | ||
"group": "parent", | ||
"position": "before" | ||
} | ||
], | ||
"pathGroupsExcludedImportTypes": ["builtin"] | ||
} | ||
] | ||
} | ||
} |
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
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
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,36 @@ | ||
--- | ||
name: Lint | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- 'l10n_master' | ||
- 'gh-pages' | ||
paths-ignore: | ||
- '.github/workflows/**' | ||
workflow_dispatch: | ||
inputs: {} | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # v3.0.0 | ||
|
||
- name: Set up Node | ||
uses: actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a # v3.0.0 | ||
with: | ||
cache: 'npm' | ||
cache-dependency-path: '**/package-lock.json' | ||
node-version: '16' | ||
|
||
- name: Run linter | ||
run: | | ||
npm ci | ||
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 @@ | ||
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 @@ | ||
_ |
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 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npx lint-staged |
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,15 @@ | ||
# Build directories | ||
**/build | ||
**/dist | ||
**/coverage | ||
|
||
**/jslib | ||
|
||
# External libraries / auto synced locales | ||
apps/browser/src/_locales | ||
apps/browser/src/scripts/duo.js | ||
apps/browser/src/content/autofill.js | ||
apps/browser/src/safari | ||
|
||
# Github Workflows | ||
.github/workflows |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.