diff --git a/TODO.md b/TODO.md index 2efb25d..8e9f9d1 100644 --- a/TODO.md +++ b/TODO.md @@ -34,6 +34,5 @@ # Webpack 5 -fixup no-param-reassign warningsFilter deprecated refactor stats diff --git a/packages/core/test/one/index.js b/packages/core/test/one/index.js index bad679f..545f3c7 100644 --- a/packages/core/test/one/index.js +++ b/packages/core/test/one/index.js @@ -20,7 +20,6 @@ export const hooks = { ), '@flecks/core/test/invoke': () => 69, '@flecks/core/test/invoke-parallel': (O) => { - // eslint-disable-next-line no-param-reassign O.foo *= 2; }, '@flecks/core/test/invoke-merge': () => ({foo: 69}), @@ -28,7 +27,6 @@ export const hooks = { '@flecks/core/test/invoke-merge-unique': () => ({foo: 69}), '@flecks/core/test/invoke-merge-unique-async': () => new Promise((resolve) => { resolve({foo: 69}); }), '@flecks/core/test.middleware': () => (foo, next) => { - // eslint-disable-next-line no-param-reassign foo.bar += 1; next(); }, diff --git a/packages/core/test/two/index.js b/packages/core/test/two/index.js index 710b7c9..cc7d131 100644 --- a/packages/core/test/two/index.js +++ b/packages/core/test/two/index.js @@ -7,7 +7,6 @@ export const hooks = { '@flecks/core/test/invoke': () => 420, '@flecks/core/test/invoke-parallel': (O) => new Promise((resolve) => { setTimeout(() => { - // eslint-disable-next-line no-param-reassign O.foo += 2; resolve(); }, 0); @@ -17,7 +16,6 @@ export const hooks = { '@flecks/core/test/invoke-merge-unique': () => ({foo: 69}), '@flecks/core/test/invoke-merge-unique-async': () => new Promise((resolve) => { resolve({foo: 69}); }), '@flecks/core/test.middleware': () => (foo, next) => { - // eslint-disable-next-line no-param-reassign foo.bar *= 2; next(); }, diff --git a/packages/governor/src/models/ban.js b/packages/governor/src/models/ban.js index e9f973b..33eccfc 100644 --- a/packages/governor/src/models/ban.js +++ b/packages/governor/src/models/ban.js @@ -32,7 +32,6 @@ export default (flecks) => { this.destroy({where: {id: ban.id}}); return [...r, null]; } - // eslint-disable-next-line no-param-reassign ban.ttl = Math.ceil((expiresAt.getTime() - Date.now()) / 1000); } return [...r, ban]; diff --git a/packages/react/src/server.js b/packages/react/src/server.js index 542af8f..2f97113 100644 --- a/packages/react/src/server.js +++ b/packages/react/src/server.js @@ -3,7 +3,6 @@ import {augmentBuild} from '@flecks/web/server'; import ssr from './ssr'; export const hooks = { - /* eslint-disable no-param-reassign */ '@flecks/core.build': (target, config, env, argv, flecks) => { const isProduction = 'production' === argv.mode; config.resolve.alias['react-native'] = 'react-native-web'; @@ -18,7 +17,6 @@ export const hooks = { augmentBuild(target, config, env, argv, flecks); } }, - /* eslint-enable no-param-reassign */ '@flecks/web/server.stream.html': (stream, req, flecks) => ( flecks.get('@flecks/react.ssr') ? ssr(stream, req, flecks) : stream ), diff --git a/packages/socket/src/packet/packer.js b/packages/socket/src/packet/packer.js index a60b70c..0c7acca 100644 --- a/packages/socket/src/packet/packer.js +++ b/packages/socket/src/packet/packer.js @@ -21,14 +21,12 @@ export default (key) => (Superclass) => { ); Packer.pack = key ? (data) => { - // eslint-disable-next-line no-param-reassign data[key] = msgpack.encode(data[key]); return Superclass.pack(data); } : (data) => msgpack.encode(data); Packer.unpack = key ? (data) => { - // eslint-disable-next-line no-param-reassign data[key] = msgpack.decode(data[key]); return Superclass.pack(data); } diff --git a/packages/user/src/server/index.js b/packages/user/src/server/index.js index d5d45e9..da8ec61 100644 --- a/packages/user/src/server/index.js +++ b/packages/user/src/server/index.js @@ -62,7 +62,6 @@ export const hooks = { passport.initialize()(socket.handshake, undefined, () => { debugSilly('@flecks/socket/server.request.socket: passport.session()'); passport.session()(socket.handshake, undefined, async () => { - /* eslint-disable no-param-reassign */ if (!socket.handshake.user) { const {User} = flecks.get('$flecks/db.models'); socket.handshake.user = new User(); @@ -74,7 +73,6 @@ export const hooks = { socket.handshake.logOut = LogOps.logOut; socket.handshake.isAuthenticated = LogOps.isAuthenticated; socket.handshake.isUnauthenticated = LogOps.isUnauthenticated; - /* eslint-enable no-param-reassign */ await socket.join(`/u/${socket.handshake.user.id}`); next(); }); diff --git a/packages/user/src/state/users.js b/packages/user/src/state/users.js index 4e2616f..5de5fae 100644 --- a/packages/user/src/state/users.js +++ b/packages/user/src/state/users.js @@ -20,7 +20,6 @@ const slice = createSlice({ entities: {0: {name: 'anonymous'}}, ids: [0], }), - /* eslint-disable no-param-reassign */ extraReducers: (builder) => { builder.addCase(hydrateLocalStorage, (state, action) => { const storage = action.payload; @@ -38,7 +37,6 @@ const slice = createSlice({ } }); }, - /* eslint-enable no-param-reassign */ }); export default slice.reducer; diff --git a/packages/web/src/server/build/entry.js b/packages/web/src/server/build/entry.js index 61748a9..285ba28 100644 --- a/packages/web/src/server/build/entry.js +++ b/packages/web/src/server/build/entry.js @@ -45,9 +45,8 @@ const {version} = require('@flecks/web/package.json'); } const progress = new Progress(window); debug('loading runtime...'); - // eslint-disable-next-line import/no-extraneous-dependencies const {default: loader} = await import( - /* webpackChunkName: "flecks-runtime" */ + /* webpackChunkName: "flecks-runtime" */ // eslint-disable-next-line import/no-unresolved '@flecks/web/runtime' ); const runtime = await loader(progress.update.bind(progress)); diff --git a/packages/web/src/server/index.js b/packages/web/src/server/index.js index 537002e..de111cb 100644 --- a/packages/web/src/server/index.js +++ b/packages/web/src/server/index.js @@ -21,7 +21,6 @@ export const hooks = { '@flecks/core.build.alter': async (configs, env, argv, flecks) => { // Don't build if there's a fleck target. if (configs.fleck && !flecks.get('@flecks/web/server.forceBuildWithFleck')) { - // eslint-disable-next-line no-param-reassign delete configs.web; return; } @@ -29,7 +28,6 @@ export const hooks = { // Only build vendor in dev. if (configs['web-vendor']) { if (isProduction) { - // eslint-disable-next-line no-param-reassign delete configs['web-vendor']; } // Only build if something actually changed. @@ -65,7 +63,6 @@ export const hooks = { catch (error) {} } if (timestamp > latest) { - // eslint-disable-next-line no-param-reassign delete configs['web-vendor']; } else if (timestamp > 0) { @@ -104,7 +101,6 @@ export const hooks = { child.kill(); }); // Remove the build config since we're handing off to WDS. - // eslint-disable-next-line no-param-reassign delete configs.web; }, '@flecks/core.build.config': () => [