Skip to content

Commit

Permalink
fix: add missing files
Browse files Browse the repository at this point in the history
  • Loading branch information
nathandebalthasar committed Nov 23, 2023
1 parent 8b13976 commit 2db12b8
Show file tree
Hide file tree
Showing 7 changed files with 85 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .eslintignore
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
42 changes: 42 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
module.exports = {
parser: "@typescript-eslint/parser", // Specifies the ESLint parser

Check failure on line 2 in .eslintrc.js

View workflow job for this annotation

GitHub Actions / lint (16.x)

Replace `parser:·"@typescript-eslint/parser"` with `··parser:·'@typescript-eslint/parser'`
extends: [

Check failure on line 3 in .eslintrc.js

View workflow job for this annotation

GitHub Actions / lint (16.x)

Replace `··` with `····`
"eslint:recommended",

Check failure on line 4 in .eslintrc.js

View workflow job for this annotation

GitHub Actions / lint (16.x)

Replace `"eslint:recommended"` with `····'eslint:recommended'`
"plugin:react/recommended",

Check failure on line 5 in .eslintrc.js

View workflow job for this annotation

GitHub Actions / lint (16.x)

Replace `"plugin:react/recommended"` with `····'plugin:react/recommended'`
"plugin:@typescript-eslint/recommended",

Check failure on line 6 in .eslintrc.js

View workflow job for this annotation

GitHub Actions / lint (16.x)

Replace `"plugin:@typescript-eslint/recommended"` with `····'plugin:@typescript-eslint/recommended'`
"plugin:prettier/recommended",

Check failure on line 7 in .eslintrc.js

View workflow job for this annotation

GitHub Actions / lint (16.x)

Replace `"plugin:prettier/recommended"` with `····'plugin:prettier/recommended'`
"prettier",

Check failure on line 8 in .eslintrc.js

View workflow job for this annotation

GitHub Actions / lint (16.x)

Replace `"prettier"` with `····'prettier'`
],

Check failure on line 9 in .eslintrc.js

View workflow job for this annotation

GitHub Actions / lint (16.x)

Replace `··` with `····`
settings: {

Check failure on line 10 in .eslintrc.js

View workflow job for this annotation

GitHub Actions / lint (16.x)

Insert `··`
react: {

Check failure on line 11 in .eslintrc.js

View workflow job for this annotation

GitHub Actions / lint (16.x)

Insert `····`
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", //
},
},
],
};
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
5 changes: 5 additions & 0 deletions .husky/pre-commit
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
19 changes: 19 additions & 0 deletions .lintstagedrc.js
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}`]
},
}
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v16.20.0
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"trailingComma": "es5",
"tabWidth": 4,
"semi": false,
"singleQuote": true
}

0 comments on commit 2db12b8

Please sign in to comment.