Skip to content

Commit

Permalink
fix(rules): add Next.js
Browse files Browse the repository at this point in the history
  • Loading branch information
bodinsamuel committed Sep 5, 2023
1 parent 72be68d commit 2f1f094
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/rules/__snapshots__/index.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ exports[`all > should match everything 1`] = `
"neo4j",
"netlify",
"newrelic",
"nextjs",
"nginx",
"nodejs",
"notion",
Expand Down
1 change: 1 addition & 0 deletions src/rules/js/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import './express.js';
import './fastify.js';
import './hotjar.js';
import './koa.js';
import './nextjs.js';
import './prettier.js';
import './prisma.js';
import './puppeteer.js';
Expand Down
9 changes: 9 additions & 0 deletions src/rules/js/nextjs.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { register } from '../../register.js';

register({
tech: 'nextjs',
name: 'Next.js',
type: 'tool',
files: ['next.config.js'],
dependencies: [{ type: 'npm', name: 'next' }],
});
6 changes: 6 additions & 0 deletions src/rules/spec/nodejs/__snapshots__/component.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ exports[`npm > should match everything 1`] = `
"neo4j",
"netlify",
"newrelic",
"nextjs",
"nodejs",
"okta",
"openai",
Expand Down Expand Up @@ -766,6 +767,11 @@ exports[`npm > should match everything 2`] = `
"newrelic",
"0.0.0",
],
[
"npm",
"next",
"0.0.0",
],
[
"npm",
"node-mailjet",
Expand Down
1 change: 1 addition & 0 deletions src/types/techs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ export type AllowedKeys =
| 'neo4j'
| 'netlify'
| 'newrelic'
| 'nextjs'
| 'nginx'
| 'nodejs'
| 'notion'
Expand Down

0 comments on commit 2f1f094

Please sign in to comment.