Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🧹 NeuralNetwork cleanup pt. 2 -- data loading #1408

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
dist
dist_examples
**/lib
.eslintrc.js

19 changes: 18 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,30 @@ const p5Globals = require("./p5Globals");
const p5SoundGlobals = require("./p5SoundGlobals");

module.exports = {
extends: ["airbnb-base", "prettier"],
extends: [
"airbnb-base",
"airbnb-typescript/base",
"prettier"
],
parserOptions: {
project: "./tsconfig.json"
},
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint", "import"],
globals: {
fetch: false,
document: true,
},
rules: {
"no-console": 0,
"arrow-body-style": 0,
"import/no-useless-path-segments": 0,
"no-constructor-return": 0,
"no-else-return": 0,
"@typescript-eslint/default-param-last": 0,
"prefer-regex-literals": 0,
"prefer-object-spread": 0,
"@typescript-eslint/lines-between-class-members": 0
},
env: {
browser: true,
Expand Down
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ module.exports = {
passWithNoTests: true,

// A preset that is used as a base for Jest's configuration
// preset: undefined,
preset: "ts-jest/presets/js-with-babel",

// Run tests from one or more projects
// projects: undefined,
Expand Down
33 changes: 3 additions & 30 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const path = require("path");
const webpackConfig = require("./webpack.common.babel");

module.exports = config => {
config.set({
Expand All @@ -20,38 +20,11 @@ module.exports = config => {
"src/utils/*.js": ["webpack"],
},
webpack: {
// TODO: This is duplication of the webpack.common.babel.js file, but they
// use different import syntaxes so it's not easy to just require it here.
// Maybe this could be put into a JSON file, but the include in the module
// rules is dynamic.
entry: ["@babel/polyfill", "./src/index.js"],
output: {
libraryTarget: "umd",
filename: "ml5.js",
library: "ml5",
},
module: {
rules: [
{
enforce: "pre",
test: /\.js$/,
exclude: /node_modules/,
loader: "eslint-loader",
},
{
test: /\.js$/,
loader: "babel-loader",
include: path.resolve(__dirname, "src"),
},
],
},
...webpackConfig,
// Don't minify the webpack build for better stack traces
optimization: {
minimize: false,
},
node: {
fs: "empty",
},
}
},
webpackMiddleware: {
noInfo: true,
Expand Down
Loading