Skip to content

Commit

Permalink
add: node eslint-plugin-security
Browse files Browse the repository at this point in the history
  • Loading branch information
hilleer committed Oct 24, 2023
1 parent 24d41c8 commit 634c3f0
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 1 deletion.
25 changes: 25 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-security": "^1.7.1",
"eslint-plugin-testing-library": "^5.11.0",
"husky": "^4.0.0",
"inquirer": "^8.2.4",
Expand Down
14 changes: 14 additions & 0 deletions src/configs/eslint/__snapshots__/config.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1271,6 +1271,7 @@ exports[`eslint with options should return a config for {
"plugin:prettier/recommended",
"airbnb-base",
"plugin:node/recommended",
"plugin:security/recommended",
],
"overrides": [
{
Expand Down Expand Up @@ -1443,6 +1444,7 @@ exports[`eslint with options should return a config for {
"plugin:prettier/recommended",
"airbnb-base",
"plugin:node/recommended",
"plugin:security/recommended",
],
"overrides": [
{
Expand Down Expand Up @@ -1613,6 +1615,7 @@ exports[`eslint with options should return a config for {
"plugin:prettier/recommended",
"airbnb-base",
"plugin:node/recommended",
"plugin:security/recommended",
],
"overrides": [
{
Expand Down Expand Up @@ -1789,6 +1792,7 @@ exports[`eslint with options should return a config for {
"plugin:prettier/recommended",
"airbnb-base",
"plugin:node/recommended",
"plugin:security/recommended",
"next",
],
"overrides": [
Expand Down Expand Up @@ -1995,6 +1999,7 @@ exports[`eslint with options should return a config for {
"plugin:prettier/recommended",
"airbnb-base",
"plugin:node/recommended",
"plugin:security/recommended",
],
"overrides": [
{
Expand Down Expand Up @@ -2161,6 +2166,7 @@ exports[`eslint with options should return a config for {
"plugin:prettier/recommended",
"airbnb-base",
"plugin:node/recommended",
"plugin:security/recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:jsx-a11y/recommended",
Expand Down Expand Up @@ -2329,6 +2335,7 @@ exports[`eslint with options should return a config for {
"plugin:prettier/recommended",
"airbnb-base",
"plugin:node/recommended",
"plugin:security/recommended",
],
"overrides": [
{
Expand Down Expand Up @@ -4676,6 +4683,7 @@ exports[`eslint with options should return a config for {
"plugin:prettier/recommended",
"airbnb-base",
"plugin:node/recommended",
"plugin:security/recommended",
],
"overrides": [
{
Expand Down Expand Up @@ -4979,6 +4987,7 @@ exports[`eslint with options should return a config for {
"plugin:prettier/recommended",
"airbnb-base",
"plugin:node/recommended",
"plugin:security/recommended",
],
"overrides": [
{
Expand Down Expand Up @@ -5280,6 +5289,7 @@ exports[`eslint with options should return a config for {
"plugin:prettier/recommended",
"airbnb-base",
"plugin:node/recommended",
"plugin:security/recommended",
],
"overrides": [
{
Expand Down Expand Up @@ -5587,6 +5597,7 @@ exports[`eslint with options should return a config for {
"plugin:prettier/recommended",
"airbnb-base",
"plugin:node/recommended",
"plugin:security/recommended",
"next",
],
"overrides": [
Expand Down Expand Up @@ -5924,6 +5935,7 @@ exports[`eslint with options should return a config for {
"plugin:prettier/recommended",
"airbnb-base",
"plugin:node/recommended",
"plugin:security/recommended",
],
"overrides": [
{
Expand Down Expand Up @@ -6221,6 +6233,7 @@ exports[`eslint with options should return a config for {
"plugin:prettier/recommended",
"airbnb-base",
"plugin:node/recommended",
"plugin:security/recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:jsx-a11y/recommended",
Expand Down Expand Up @@ -6520,6 +6533,7 @@ exports[`eslint with options should return a config for {
"plugin:prettier/recommended",
"airbnb-base",
"plugin:node/recommended",
"plugin:security/recommended",
],
"overrides": [
{
Expand Down
2 changes: 1 addition & 1 deletion src/configs/eslint/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ function customizeEnvironments(environments?: Environment[]) {
],
},
[Environment.NODE]: {
extends: ['plugin:node/recommended'],
extends: ['plugin:node/recommended', 'plugin:security/recommended'],
env: { node: true },
rules: {
// We don't know if the user's source code is using EJS or CJS.
Expand Down

0 comments on commit 634c3f0

Please sign in to comment.