-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from CatsMeow492/deployment/nospam
dont spam deployments
- Loading branch information
Showing
12 changed files
with
210 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Lint Codebase | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
pull_request: | ||
branches: | ||
- main | ||
- master | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '14' | ||
|
||
- name: Install dependencies | ||
run: | | ||
cd frontend | ||
npm install | ||
- name: Run ESLint | ||
run: | | ||
cd frontend | ||
npm run lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,32 @@ | ||
import globals from "globals"; | ||
import pluginJs from "@eslint/js"; | ||
import pluginReact from "eslint-plugin-react"; | ||
|
||
import pluginReactHooks from "eslint-plugin-react-hooks"; | ||
import pluginImport from "eslint-plugin-import"; | ||
|
||
export default [ | ||
{files: ["**/*.{js,mjs,cjs,jsx}"]}, | ||
{languageOptions: { globals: globals.browser }}, | ||
{ | ||
files: ["**/*.{js,mjs,cjs,jsx}"], | ||
languageOptions: { | ||
globals: { | ||
...globals.browser, | ||
process: "readonly", | ||
test: "readonly", | ||
expect: "readonly", | ||
}, | ||
}, | ||
plugins: { | ||
react: pluginReact, | ||
"react-hooks": pluginReactHooks, | ||
import: pluginImport, | ||
}, | ||
rules: { | ||
"react/prop-types": "error", // Ensure prop-types validation | ||
"no-unused-vars": "warn", // Warn about unused variables | ||
"no-undef": "error", // Error on undefined variables | ||
"react/react-in-jsx-scope": "off", // React 17+ does not require React in scope | ||
}, | ||
}, | ||
pluginJs.configs.recommended, | ||
pluginReact.configs.flat.recommended, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import globals from "globals"; | ||
import pluginJs from "@eslint/js"; | ||
import pluginReact from "eslint-plugin-react"; | ||
import pluginReactHooks from "eslint-plugin-react-hooks"; | ||
import pluginImport from "eslint-plugin-import"; | ||
|
||
export default [ | ||
{ | ||
files: ["**/*.{js,mjs,cjs,jsx}"], | ||
languageOptions: { | ||
globals: { | ||
...globals.browser, | ||
process: "readonly", | ||
test: "readonly", | ||
expect: "readonly", | ||
}, | ||
}, | ||
plugins: { | ||
react: pluginReact, | ||
"react-hooks": pluginReactHooks, | ||
import: pluginImport, | ||
}, | ||
rules: { | ||
"react/prop-types": "error", // Ensure prop-types validation | ||
"no-unused-vars": "warn", // Warn about unused variables | ||
"no-undef": "error", // Error on undefined variables | ||
"react/react-in-jsx-scope": "off", // React 17+ does not require React in scope | ||
}, | ||
}, | ||
pluginJs.configs.recommended, | ||
pluginReact.configs.flat.recommended, | ||
]; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
import React from 'react'; | ||
import { render, screen } from '@testing-library/react'; | ||
import App from './App'; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.