-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update dependencies and re-structure the repo (#29)
- Loading branch information
1 parent
7c0f802
commit ee96bcc
Showing
10 changed files
with
3,370 additions
and
2,603 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 |
---|---|---|
|
@@ -2,4 +2,6 @@ npm | |
dist | ||
build | ||
coverage | ||
node_modules | ||
node_modules | ||
__mocks__ | ||
__snapshots__ |
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,45 @@ | ||
module.exports = (api, options, cwd) => { | ||
api.assertVersion(7); | ||
|
||
let caller = ""; | ||
|
||
api.caller((instance) => { | ||
if (instance != null) { | ||
caller = instance.name; | ||
} | ||
|
||
return true; | ||
}); | ||
|
||
const env = api.env(); | ||
api.cache.using(() => | ||
JSON.stringify({ | ||
env, | ||
caller, | ||
cwd, | ||
options, | ||
NODE_ENV: process.env.NODE_ENV, | ||
BABEL_ENV: process.env.BABEL_ENV | ||
}) | ||
); | ||
|
||
return { | ||
presets: [ | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
forceAllTransforms: true, | ||
targets: { | ||
node: true | ||
} | ||
} | ||
], | ||
"@babel/preset-react" | ||
], | ||
plugins: [ | ||
"add-module-exports", | ||
"@babel/plugin-transform-runtime", | ||
"@babel/plugin-proposal-object-rest-spread" | ||
] | ||
}; | ||
}; |
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,45 @@ | ||
const prettier = require("./prettier.config"); | ||
|
||
module.exports = { | ||
parser: "babel-eslint", | ||
parserOptions: { | ||
sourceType: "module" | ||
}, | ||
extends: ["eslint:recommended", "plugin:react/recommended", "prettier"], | ||
plugins: ["react", "jest", "json", "prettier", "filenames"], | ||
env: { | ||
es6: true, | ||
node: true, | ||
jest: true | ||
}, | ||
rules: { | ||
"semi": "error", | ||
"require-jsdoc": "error", | ||
"valid-jsdoc": [ | ||
"error", | ||
{ | ||
preferType: { | ||
any: "*", | ||
Boolean: "boolean", | ||
Number: "number", | ||
Object: "object", | ||
String: "string", | ||
return: "returns" | ||
}, | ||
requireReturnType: true, | ||
requireParamDescription: true, | ||
requireReturnDescription: true | ||
} | ||
], | ||
"quotes": [ | ||
"error", | ||
"double", | ||
{ | ||
avoidEscape: true | ||
} | ||
], | ||
"filenames/no-index": "off", | ||
"filenames/match-exported": ["error", [null, "kebab", "camel"]], | ||
"prettier/prettier": ["error", prettier] | ||
} | ||
}; |
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 @@ | ||
module.exports = { | ||
moduleFileExtensions: ["js", "jsx"], | ||
testMatch: ["**/specs/**/*[.-][Ss]pec{,s}.{j}s"], | ||
rootDir: ".", | ||
verbose: false, | ||
resetMocks: true, | ||
resetModules: true, | ||
collectCoverageFrom: [ | ||
"src/*.js", | ||
"!**/*.min.js", | ||
"!**/static/**", | ||
"!**/specs/**", | ||
"!**/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
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,17 @@ | ||
module.exports = { | ||
printWidth: 80, | ||
tabWidth: 2, | ||
useTabs: false, | ||
semi: true, | ||
singleQuote: false, | ||
quoteProps: "consistent", | ||
trailingComma: "none", | ||
bracketSpacing: true, | ||
arrowParens: "always", | ||
insertPragma: false, | ||
endOfLine: "lf", | ||
proseWrap: "preserve", | ||
htmlWhitespaceSensitivity: "css", | ||
jsxSingleQuote: false, | ||
jsxBracketSameLine: false | ||
}; |
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
Oops, something went wrong.