19 changed files with 5363 additions and 2249 deletions
@ -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 |
||||||
@ -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"] |
||||||
|
} |
||||||
|
] |
||||||
|
} |
||||||
|
} |
||||||
@ -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 |
||||||
@ -0,0 +1,4 @@ |
|||||||
|
#!/bin/sh |
||||||
|
. "$(dirname "$0")/_/husky.sh" |
||||||
|
|
||||||
|
npx lint-staged |
||||||
@ -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 |
||||||
@ -1,9 +0,0 @@ |
|||||||
**/build |
|
||||||
jslib |
|
||||||
webpack.config.js |
|
||||||
karma.conf.js |
|
||||||
gulpfile.js |
|
||||||
src/content/autofill.js |
|
||||||
src/scripts/duo.js |
|
||||||
|
|
||||||
**/node_modules |
|
||||||
@ -1,32 +0,0 @@ |
|||||||
{ |
|
||||||
"root": true, |
|
||||||
"env": { |
|
||||||
"browser": true, |
|
||||||
"webextensions": true |
|
||||||
}, |
|
||||||
"extends": ["./jslib/shared/eslintrc.json"], |
|
||||||
"rules": { |
|
||||||
"import/order": [ |
|
||||||
"error", |
|
||||||
{ |
|
||||||
"alphabetize": { |
|
||||||
"order": "asc" |
|
||||||
}, |
|
||||||
"newlines-between": "always", |
|
||||||
"pathGroups": [ |
|
||||||
{ |
|
||||||
"pattern": "jslib-*/**", |
|
||||||
"group": "external", |
|
||||||
"position": "after" |
|
||||||
}, |
|
||||||
{ |
|
||||||
"pattern": "src/**/*", |
|
||||||
"group": "parent", |
|
||||||
"position": "before" |
|
||||||
} |
|
||||||
], |
|
||||||
"pathGroupsExcludedImportTypes": ["builtin"] |
|
||||||
} |
|
||||||
] |
|
||||||
} |
|
||||||
} |
|
||||||
@ -1,15 +0,0 @@ |
|||||||
# Build directories |
|
||||||
build |
|
||||||
dist |
|
||||||
coverage |
|
||||||
|
|
||||||
jslib |
|
||||||
|
|
||||||
# External libraries / auto synced locales |
|
||||||
src/_locales |
|
||||||
src/scripts/duo.js |
|
||||||
src/content/autofill.js |
|
||||||
src/safari |
|
||||||
|
|
||||||
# Github Workflows |
|
||||||
.github/workflows |
|
||||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,36 @@ |
|||||||
|
{ |
||||||
|
"name": "@bitwarden/bitwarden", |
||||||
|
"version": "0.0.0", |
||||||
|
"description": "Bitwarden Client Applications", |
||||||
|
"repository": { |
||||||
|
"type": "git", |
||||||
|
"url": "git+https://github.com/bitwarden/bitwarden.git" |
||||||
|
}, |
||||||
|
"author": "Bitwarden Inc. <hello@bitwarden.com> (https://bitwarden.com)", |
||||||
|
"license": "GPL-3.0", |
||||||
|
"bugs": { |
||||||
|
"url": "https://github.com/bitwarden/bitwarden/issues" |
||||||
|
}, |
||||||
|
"homepage": "https://bitwarden.com", |
||||||
|
"scripts": { |
||||||
|
"lint": "eslint . && prettier --check .", |
||||||
|
"lint:fix": "eslint . --fix", |
||||||
|
"prettier": "prettier --write .", |
||||||
|
"prepare": "husky install" |
||||||
|
}, |
||||||
|
"devDependencies": { |
||||||
|
"@typescript-eslint/eslint-plugin": "^5.22.0", |
||||||
|
"@typescript-eslint/parser": "^5.22.0", |
||||||
|
"eslint": "^8.14.0", |
||||||
|
"eslint-config-prettier": "^8.5.0", |
||||||
|
"eslint-import-resolver-typescript": "^2.7.1", |
||||||
|
"eslint-plugin-import": "^2.26.0", |
||||||
|
"husky": "^7.0.4", |
||||||
|
"lint-staged": "^12.4.1", |
||||||
|
"prettier": "^2.6.2" |
||||||
|
}, |
||||||
|
"lint-staged": { |
||||||
|
"./!(**/jslib)**": "prettier --ignore-unknown --write", |
||||||
|
"*.ts": "eslint --fix" |
||||||
|
} |
||||||
|
} |
||||||
Loading…
Reference in new issue