-
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.
* 🎨 initiate new next project * 🎨 more setup * 🎨 add staged lint * 🎨 add code ql flow
- Loading branch information
1 parent
7dfa9cc
commit 36786f5
Showing
42 changed files
with
13,039 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# For most projects, this workflow file will not need changing; you simply need | ||
# to commit it to your repository. | ||
# | ||
# You may wish to alter this file to override the set of languages analyzed, | ||
# or to provide custom queries or build logic. | ||
# | ||
# ******** NOTE ******** | ||
# We have attempted to detect the languages in your repository. Please check | ||
# the `language` matrix defined below to confirm you have the correct set of | ||
# supported CodeQL languages. | ||
# | ||
name: 'CodeQL' | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [main] | ||
schedule: | ||
- cron: '35 1 * * 4' | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: ['javascript'] | ||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] | ||
# Learn more: | ||
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v2 | ||
with: | ||
languages: ${{ matrix.language }} | ||
# If you wish to specify custom queries, you can do so here or in a config file. | ||
# By default, queries listed here will override any specified in a config file. | ||
# Prefix the list here with "+" to use these queries and those in the config file. | ||
# queries: ./path/to/local/query, your-org/your-repo/queries@main | ||
|
||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java). | ||
# If this step fails, then you should remove it and run the build manually (see below) | ||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v2 | ||
|
||
# ℹ️ Command-line programs to run using the OS shell. | ||
# 📚 https://git.io/JvXDl | ||
|
||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines | ||
# and modify them (or add more) to build your code if your project | ||
# uses a compiled language | ||
|
||
#- run: | | ||
# make bootstrap | ||
# make release | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 |
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,44 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
node_modules | ||
.pnp | ||
.pnp.* | ||
.yarn/* | ||
!.yarn/patches | ||
!.yarn/plugins | ||
!.yarn/releases | ||
!.yarn/versions | ||
|
||
# testing | ||
coverage | ||
|
||
# next.js | ||
.next/ | ||
out/ | ||
|
||
# production | ||
build | ||
dist | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
.pnpm-debug.log* | ||
|
||
# env files (can opt-in for committing if needed) | ||
.env* | ||
**/.env* | ||
|
||
|
||
# vercel | ||
.vercel | ||
|
||
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts |
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,2 @@ | ||
prettier $(git diff --cached --name-only --diff-filter=ACMR | sed 's| |\\ |g') --write --ignore-unknown | ||
git update-index --again |
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,10 @@ | ||
const path = require("path"); | ||
|
||
const buildEslintCommand = (filenames) => | ||
`next lint --fix --file ${filenames | ||
.map((f) => path.relative(process.cwd(), f)) | ||
.join(" --file ")}`; | ||
|
||
module.exports = { | ||
"*.{js,jsx,ts,tsx}": [buildEslintCommand], | ||
}; |
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 @@ | ||
* @equinor/energyvision |
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,49 @@ | ||
# How we work | ||
|
||
In Equinor, [how we deliver is as important as what we | ||
deliver](https://www.equinor.com/en/careers/our-culture.html). | ||
|
||
This set the expectations for how we collaborate in our open source projects, | ||
and applies to all community members and participants in any Equinor maintained | ||
project. | ||
|
||
## Handling issues within the communities | ||
|
||
We expect all to have a low threshold for raising issues, or in general discuss | ||
how we live up to our | ||
[values](https://www.equinor.com/en/about-us.html#our-values). Equally, we also | ||
encourage all community members to appreciate when concerns are raised, and make | ||
its best effort in solving them. | ||
|
||
As well as responsibility for what is delivered the project maintainers are also | ||
responsible creating an environment for proper handling of issues raised within | ||
the communities. | ||
|
||
## Call out for assistance | ||
|
||
For any problem not directly resolvable within the community, we encourage you | ||
to call out for assistance. Getting an outsiders perspective on the topic might | ||
be just what is needed for you to proceed. | ||
|
||
Send an e-mail to opensource_at_equinor.com and invite for a discussion. The | ||
email will be handled by a team within the Equinor organization. | ||
|
||
Your request will be kept confidential from the team or community in question, | ||
unless you chose to disclose it yourself. | ||
|
||
## Ethics helpline | ||
|
||
In Equinor, we want you to speak up whenever you see unethical behaviour that | ||
conflicts with our values or threatens our reputation. | ||
|
||
To underline this, we continuously encourage and remind our employees and any | ||
external third parties interacting with us to raise concerns or report any | ||
suspected or potential breaches of law or company policies. | ||
|
||
For any questions or issues that one suspect falls outside the scope of | ||
behaviour regulated, and handled within the open source code of conduct, or you | ||
wish to place an anonymous, confidential report we encourage to use the [Equinor | ||
Ethics | ||
helpline](https://secure.ethicspoint.eu/domain/media/en/gui/102166/index.html). | ||
|
||
This helpline is hosted by a third party helpline provider. |
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,2 +1,50 @@ | ||
# brandwalls | ||
Repository for Equinor brandwalls solution | ||
<p align="center"> | ||
<a href="https://www.equinor.com"> | ||
<img width="300" src=".github/Equinor_HORIZ_logo_RGB_RED.png"> | ||
</a> | ||
</p> | ||
|
||
# Brandwalls | ||
|
||
This is the main repository for Equinor Brandwalls. This version of the website is built using the [Sanity content platform](https://www.sanity.io/) as headless CMS and [Next.js](https://nextjs.org/) for the web frontend. | ||
|
||
The project is licensed under the [MIT license](https://github.com/equinor/energyvision/blob/main/LICENSE) following [the open source strategy of Equinor](https://opensource.equinor.com) and integrates elements from the [Equinor Design System](https://eds.equinor.com). | ||
|
||
This project uses [pnpm](https://pnpm.io) as main package manager. You can install pnpm using npm as shown below, or use one of the [alternative installation methods](https://pnpm.io/installation). | ||
|
||
```bash | ||
# Install pnpm | ||
npm i -g pnpm | ||
|
||
# Install all project dependencies | ||
pnpm setup-project | ||
``` | ||
|
||
## Project overview | ||
|
||
This monorepo is organized into several folder. Please refer to README files inside each folder for more information. | ||
|
||
- `studio` - [Sanity](https://www.sanity.io/) powered content platform. | ||
- `web` - Web application using [Next.js](https://nextjs.org/) and React components. | ||
|
||
## Package managers | ||
|
||
This project uses the pnpm package manager. All commands should be run from root. There are filter aliases in the root `package.json` file that can be used to run commands in specific directories. For example: | ||
|
||
```bash | ||
# Install dependencies | ||
pnpm web install | ||
|
||
# Start the web in dev mode | ||
pnpm web dev | ||
|
||
# Add some package to the web folder | ||
pnpm web add <some-package> | ||
|
||
# Build Next.js | ||
pnpm web build | ||
``` | ||
|
||
## Contributing | ||
|
||
If you want to report a bug, please create an issue in GitHub unless it is a security issue. If it is a security issue, please follow our Security Reporting Policy in SECURITY.md file. |
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,19 @@ | ||
# Security | ||
|
||
If you discover a security vulnerability in this project, please follow these steps to responsibly disclose it: | ||
|
||
1. **Do not** create a public GitHub issue for the vulnerability. | ||
|
||
2. Follow our guideline for Responsible Disclosure Policy at <https://www.equinor.com/about-us/csirt> to report the issue | ||
|
||
The following information will help us triage your report more quickly: | ||
|
||
- Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) | ||
- Full paths of source file(s) related to the manifestation of the issue | ||
- The location of the affected source code (tag/branch/commit or direct URL) | ||
- Any special configuration required to reproduce the issue | ||
- Step-by-step instructions to reproduce the issue | ||
- Proof-of-concept or exploit code (if possible) | ||
- Impact of the issue, including how an attacker might exploit the issue | ||
|
||
We prefer all communications to be in English. |
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,22 @@ | ||
import { dirname } from "path"; | ||
import { fileURLToPath } from "url"; | ||
import { FlatCompat } from "@eslint/eslintrc"; | ||
|
||
const __filename = fileURLToPath(import.meta.url); | ||
const __dirname = dirname(__filename); | ||
|
||
const compat = new FlatCompat({ | ||
baseDirectory: __dirname, | ||
}); | ||
|
||
const eslintConfig = [ | ||
...compat.extends( | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/strict-type-checked", | ||
"plugin:@typescript-eslint/stylistic-type-checked", | ||
"next/core-web-vitals", | ||
"prettier" | ||
), | ||
]; | ||
|
||
export default eslintConfig; |
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,25 @@ | ||
{ | ||
"name": "brandwalls", | ||
"private": true, | ||
"engines": { | ||
"pnpm": ">=6" | ||
}, | ||
"type": "module", | ||
"scripts": { | ||
"setup-project": "pnpm m i", | ||
"web": "pnpm --filter ./web", | ||
"studio": "pnpm --filter ./studio", | ||
"prepare": "husky" | ||
}, | ||
"devDependencies": { | ||
"@eslint/eslintrc": "^3", | ||
"@typescript-eslint/eslint-plugin": "^8.19.0", | ||
"eslint": "^9", | ||
"eslint-config-next": "15.1.3", | ||
"eslint-config-prettier": "^9.1.0", | ||
"husky": "^9.1.7", | ||
"lint-staged": "^15.3.0", | ||
"prettier-plugin-tailwindcss": "^0.6.9", | ||
"typescript": "5.7.2" | ||
} | ||
} |
Oops, something went wrong.