-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
8b13976
commit 2db12b8
Showing
7 changed files
with
85 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,11 @@ | ||
node_modules | ||
amplify | ||
tests | ||
public | ||
aws-video-exports.js | ||
aws-exports.js | ||
src/models | ||
.cache | ||
.github | ||
.idea | ||
.vscode |
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,42 @@ | ||
module.exports = { | ||
parser: "@typescript-eslint/parser", // Specifies the ESLint parser | ||
extends: [ | ||
"eslint:recommended", | ||
"plugin:react/recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:prettier/recommended", | ||
"prettier", | ||
], | ||
settings: { | ||
react: { | ||
version: "detect", | ||
}, | ||
}, | ||
env: { | ||
browser: true, | ||
node: true, | ||
es6: true, | ||
}, | ||
plugins: ["@typescript-eslint", "react"], | ||
parserOptions: { | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features | ||
sourceType: "module", // Allows for the use of imports | ||
}, | ||
rules: { | ||
"react/prop-types": "off", // Disable prop-types as we use TypeScript for type checking | ||
"@typescript-eslint/explicit-function-return-type": "off", | ||
"@typescript-eslint/explicit-module-boundary-types": "off", | ||
}, | ||
overrides: [ | ||
// Override some TypeScript rules just for .js files | ||
{ | ||
files: ["*.js"], | ||
rules: { | ||
"@typescript-eslint/no-var-requires": "off", // | ||
}, | ||
}, | ||
], | ||
}; |
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,5 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npm run pre-commit | ||
#exit 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,19 @@ | ||
const { ESLint } = require('eslint') | ||
const filterAsync = require('node-filter-async').default | ||
|
||
const eslintCli = new ESLint() | ||
|
||
const removeIgnoredFiles = async (files) => { | ||
const filteredFiles = await filterAsync(files, async (file) => { | ||
const isIgnored = await eslintCli.isPathIgnored(file) | ||
return !isIgnored | ||
}) | ||
return filteredFiles.join(' ') | ||
} | ||
|
||
module.exports = { | ||
'**/*.{ts,tsx,js,jsx}': async (files) => { | ||
const filesToLint = await removeIgnoredFiles(files) | ||
return [`eslint --max-warnings=0 ${filesToLint}`] | ||
}, | ||
} |
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 @@ | ||
v16.20.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,6 @@ | ||
{ | ||
"trailingComma": "es5", | ||
"tabWidth": 4, | ||
"semi": false, | ||
"singleQuote": true | ||
} |