LOCALCOP .dev

Your local code enforcement officer.
Every violation will be found.

ACTIVE VIOLATIONS

VIOLATION #001 ERROR 🔍
const user = getUser()
user.name = undefined
saveUser(user)

Assignment of undefined to required property user.name. This will cause a runtime TypeError in strict mode.

src/handlers/auth.ts:42
VIOLATION #002 WARN 🔍
function fetchData() {
  return await fetch('/api')
}

Using await inside a non-async function. Add async keyword to function declaration.

src/api/client.ts:18
VIOLATION #003 ERROR 🔍
app.get('/admin', (req, res) => {
  eval(req.query.cmd)
  res.send('ok')
})

Critical: eval() with user input detected. Remote code execution vulnerability. Severity: CRITICAL.

src/routes/admin.ts:7
VIOLATION #004 INFO 🔍
const x = 1
const y=2
const z = 3

Inconsistent spacing around assignment operator. Expected spaces around =.

src/utils/math.ts:15
VIOLATION #005 WARN 🔍
const items = [1, 2, 3]
items.foreach(i => run(i))
// ^ should be forEach

Property foreach does not exist on type Array. Did you mean forEach?

src/tasks/runner.ts:33
VIOLATION #006 WARN 🔍
"dependencies": {
  "lodash": "^3.10.1"
}

Outdated dependency: lodash@3.10.1 is 8 major versions behind. Known CVEs in this version.

package.json:12
VIOLATION #007 INFO 🔍
if (condition) {
  console.log('debug')
  doWork()
}

Unexpected console.log statement. Remove debug logging before committing.

src/middleware/logger.ts:28
VIOLATION #008 ERROR 🔍
import { render } from 'react-dom'
// react-dom not in dependencies
render(App, root)

Module react-dom imported but not listed in dependencies. Run npm install react-dom.

src/index.tsx:1