forked from birkir/react-native-carplay
-
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
Showing
362 changed files
with
27,581 additions
and
37,060 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,170 @@ | ||
module.exports = { | ||
root: true, | ||
env: { | ||
node: true, | ||
es6: true, | ||
}, | ||
ignorePatterns: ['**/node_modules', '**/dist', '**/build', '**/lib'], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
ecmaFeatures: { | ||
jsx: true, | ||
globalReturn: false, | ||
}, | ||
ecmaVersion: 2020, | ||
project: ['tsconfig.json'], | ||
sourceType: 'module', | ||
extraFileExtensions: ".mjs" | ||
}, | ||
settings: { | ||
react: { | ||
version: 'detect', | ||
}, | ||
'import/resolver': { | ||
typescript: {}, | ||
}, | ||
}, | ||
plugins: ['sonarjs'], | ||
extends: [ | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:import/recommended', | ||
'plugin:import/typescript', | ||
'plugin:regexp/recommended', | ||
'plugin:prettier/recommended', | ||
], | ||
globals: { | ||
context: 'readonly', | ||
cy: 'readonly', | ||
assert: 'readonly', | ||
Cypress: 'readonly', | ||
}, | ||
rules: { | ||
'regexp/no-unused-capturing-group': 'off', | ||
'linebreak-style': ['error', 'unix'], | ||
'no-empty-function': 'off', | ||
'@typescript-eslint/no-empty-function': [ | ||
'error', | ||
{ allow: ['private-constructors'] }, | ||
], | ||
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }], | ||
'import/default': 'off', | ||
'import/no-named-as-default-member': 'off', | ||
'import/no-named-as-default': 'off', | ||
'import/order': [ | ||
'error', | ||
{ | ||
groups: [ | ||
'builtin', | ||
'external', | ||
'internal', | ||
'parent', | ||
'sibling', | ||
'index', | ||
'object', | ||
], | ||
alphabetize: { order: 'asc', caseInsensitive: true }, | ||
}, | ||
], | ||
'@typescript-eslint/consistent-type-exports': 'error', | ||
'@typescript-eslint/consistent-type-imports': 'error', | ||
'@typescript-eslint/naming-convention': [ | ||
'error', | ||
{ | ||
selector: 'default', | ||
format: ['camelCase'], | ||
leadingUnderscore: 'allow', | ||
trailingUnderscore: 'forbid', | ||
}, | ||
{ | ||
selector: 'variable', | ||
format: ['camelCase', 'PascalCase', 'UPPER_CASE'], | ||
leadingUnderscore: 'allow', | ||
}, | ||
{ | ||
selector: ['function'], | ||
format: ['camelCase', 'PascalCase'], | ||
}, | ||
{ | ||
selector: 'parameter', | ||
format: ['camelCase'], | ||
leadingUnderscore: 'allow', | ||
}, | ||
{ | ||
selector: 'class', | ||
format: ['PascalCase'], | ||
}, | ||
{ | ||
selector: 'classProperty', | ||
format: ['camelCase'], | ||
}, | ||
{ | ||
selector: 'objectLiteralProperty', | ||
format: [ | ||
'camelCase', | ||
// Some external libraries use snake_case for params | ||
'snake_case', | ||
// Env variables are generally uppercase | ||
'UPPER_CASE', | ||
'PascalCase' | ||
], | ||
leadingUnderscore: 'allowSingleOrDouble', | ||
}, | ||
{ | ||
selector: ['typeAlias', 'interface'], | ||
format: ['PascalCase'], | ||
}, | ||
{ | ||
selector: ['typeProperty'], | ||
format: ['camelCase', 'UPPER_CASE', 'snake_case'], | ||
leadingUnderscore: 'allow', | ||
}, | ||
{ | ||
selector: ['typeParameter'], | ||
format: ['PascalCase'], | ||
}, | ||
{ | ||
selector: ['enumMember'], | ||
format: ['PascalCase', 'camelCase'], | ||
}, | ||
{ | ||
selector: ['enum'], | ||
format: ['PascalCase'], | ||
}, | ||
], | ||
}, | ||
overrides: [ | ||
{ | ||
// For performance run sonarjs/recommended on regular code, not test files. | ||
files: ['**/*.{js,jsx,ts,tsx}'], | ||
excludedFiles: ['**/__tests__/**/*.{js,jsx,ts,tsx}', '**/*.{spec,stories,res}.{js,jsx,ts,tsx}'], | ||
extends: ['plugin:sonarjs/recommended'], | ||
rules: { | ||
'sonarjs/no-nested-template-literals': 'off', | ||
'sonarjs/cognitive-complexity': 'warn', | ||
'sonarjs/no-small-switch': 'warn', | ||
'sonarjs/no-identical-expressions': 'off', | ||
'sonarjs/no-identical-functions': 'warn', | ||
'sonarjs/no-duplicate-string': ["error", 5] | ||
}, | ||
}, | ||
{ | ||
files: ['*.js', '*.mjs'], | ||
parser: 'espree', | ||
parserOptions: { | ||
ecmaVersion: 2020, | ||
}, | ||
rules: { | ||
'@typescript-eslint/naming-convention': 'off', | ||
'@typescript-eslint/ban-ts-comment': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/no-var-requires': 'off', | ||
'@typescript-eslint/explicit-module-boundary-types': 'off', | ||
'sonarjs/no-duplicate-string': 'off', | ||
'sonarjs/no-all-duplicated-branches': 'off', | ||
'@typescript-eslint/consistent-type-exports': 'off', | ||
'@typescript-eslint/consistent-type-imports': 'off', | ||
'import/order': 'off', | ||
}, | ||
}, | ||
], | ||
}; |
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
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,60 @@ | ||
name: ci/monorepo-integrity | ||
|
||
on: | ||
push: | ||
branches: | ||
- dev | ||
- main | ||
paths: | ||
- 'yarn.lock' | ||
- '.yarnrc.yml' | ||
- '.github/workflows/ci-monorepo-integrity.yml' | ||
|
||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
paths: | ||
- 'yarn.lock' | ||
- '.yarnrc.yml' | ||
- '.github/workflows/ci-monorepo-integrity.yml' | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [16.x] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn config get cacheFolder)" | ||
|
||
- name: Restore yarn cache | ||
uses: actions/cache@v3 | ||
id: yarn-cache | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: yarn-cache-folder-${{ hashFiles('**/yarn.lock', '.yarnrc.yml') }} | ||
restore-keys: | | ||
yarn-cache-folder- | ||
- name: Install dependencies | ||
run: | | ||
yarn install --immutable | ||
- name: Check for duplicate dependencies in lock file | ||
run: | | ||
yarn dedupe --check | ||
- name: Check for yarn constraints.pro | ||
run: | | ||
yarn constraints | ||
- name: Check monorepo dependency graph | ||
run: | | ||
yarn check:install |
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,80 @@ | ||
name: ci/packages | ||
|
||
on: | ||
push: | ||
branches: | ||
- dev | ||
- main | ||
paths: | ||
- 'packages/**' | ||
- '.yarnrc.yml' | ||
- 'yarn.lock' | ||
- '.prettier*' | ||
- 'tsconfig.base.json' | ||
- '.prettier*' | ||
- '.github/workflows/ci-packages.yml' | ||
|
||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
paths: | ||
- 'packages/**' | ||
- '.yarnrc.yml' | ||
- 'yarn.lock' | ||
- '.prettier*' | ||
- 'tsconfig.base.json' | ||
- '.prettier*' | ||
- '.github/workflows/ci-packages.yml' | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [14.x] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn config get cacheFolder)" | ||
|
||
- name: Restore yarn cache | ||
uses: actions/cache@v3 | ||
id: yarn-cache | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: yarn-cache-folder-${{ hashFiles('**/yarn.lock', '.yarnrc.yml') }} | ||
restore-keys: | | ||
yarn-cache-folder- | ||
- name: Restore packages cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
${{ github.workspace }}/.cache | ||
${{ github.workspace }}/**/tsconfig.tsbuildinfo | ||
${{ github.workspace }}/**/.eslintcache | ||
key: ${{ runner.os }}-packages-cache-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('packages/**.[jt]sx?', 'packages/**.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-packages-cache-${{ hashFiles('**/yarn.lock') }}- | ||
- name: Install dependencies | ||
run: | | ||
yarn install --immutable | ||
- name: Typecheck | ||
run: | | ||
yarn workspaces foreach -tv --from 'react-native-carplay' --since=origin/main --recursive run typecheck | ||
- name: Linter | ||
run: | | ||
yarn workspaces foreach -tv --include 'react-native-carplay' --since=origin/main --recursive run lint --cache | ||
- name: Run build for changed packages | ||
run: | | ||
yarn workspaces foreach -tv --include 'react-native-carplay' --since=origin/main run build |
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,4 +1,6 @@ | ||
package.json | ||
node_modules | ||
lib/**/* | ||
example | ||
.yarn | ||
**/.next/** | ||
**/dist/** | ||
**/lib/** | ||
**/build/** | ||
**/tmp/** |
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
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.