Skip to content

Commit

Permalink
Fix dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
ncalteen committed Sep 3, 2024
1 parent c9cf750 commit 3c74f5b
Show file tree
Hide file tree
Showing 25 changed files with 708 additions and 219 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
5 changes: 0 additions & 5 deletions .github/codeql/codeql-config.yml

This file was deleted.

3 changes: 0 additions & 3 deletions .github/linters/.checkov.yml

This file was deleted.

12 changes: 6 additions & 6 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ on:
schedule:
- cron: '30 1 * * 4'

permissions:
actions: read
checks: write
contents: read
security-events: write

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

permissions:
actions: read
checks: write
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
Expand Down
27 changes: 11 additions & 16 deletions .github/workflows/super-linter.yml → .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Super Linter
name: Lint Codebase

on:
push:
Expand All @@ -8,16 +8,18 @@ on:
branches:
- main

permissions:
contents: read
issues: write
packages: read
pull-requests: write
statuses: write

jobs:
lint:
name: Lint Codebase
runs-on: ubuntu-latest

permissions:
contents: read
packages: read
statuses: write

steps:
- name: Checkout
id: checkout
Expand All @@ -36,15 +38,8 @@ jobs:
id: install
run: npm ci

- name: Super Linter
id: super-linter
uses: super-linter/super-linter/slim@v6
- name: Lint Codebase
id: lint
uses: oxsecurity/megalinter/flavors/javascript@v8
env:
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JAVASCRIPT_DEFAULT_STYLE: prettier
TYPESCRIPT_DEFAULT_STYLE: prettier
VALIDATE_ALL_CODEBASE: false
VALIDATE_JAVASCRIPT_STANDARD: false
VALIDATE_JSCPD: false
VALIDATE_TSX: false
4 changes: 0 additions & 4 deletions .github/linters/.markdown-lint.yml → .markdown-lint.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
###########################
## Markdown Linter rules ##
###########################

MD003: false
MD004:
style: dash
Expand Down
149 changes: 149 additions & 0 deletions .mega-linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
# Mega-Linter Configuration File
# https://megalinter.io/latest/config-file/

# Activates formatting and autofix
APPLY_FIXES: none

# Flag to clear files from report folder before starting the linting process
CLEAR_REPORT_FOLDER: true

DEFAULT_BRANCH: main

# List of disabled descriptors keys
# https://megalinter.io/latest/config-activation/
DISABLE:
- COPYPASTE
- JAVASCRIPT
- PYTHON
- SPELL

# List of disabled linters keys
# https://megalinter.io/latest/config-activation/
DISABLE_LINTERS:
- JSON_NPM_PACKAGE_JSON_LINT
- MARKDOWN_MARKDOWN_TABLE_FORMATTER
- REPOSITORY_KICS
- REPOSITORY_TRIVY
- TYPESCRIPT_STANDARD

# List of enabled but not blocking linters keys
# https://megalinter.io/latest/config-activation/
# DISABLE_ERRORS_LINTERS: []

# List of enabled descriptors keys
# https://megalinter.io/latest/config-activation/
# If you use ENABLE variable, all other linters will be disabled by default
# ENABLE: []

# List of enabled linters keys
# If you use ENABLE_LINTERS variable, all other linters will be disabled
# ENABLE_LINTERS: []

# List of excluded directory basenames.
EXCLUDED_DIRECTORIES:
- .cache
- .git
- coverage
- dist
- megalinter-reports
- node_modules
- public
- scripts
- reports

# If set to true, MegaLinter fails if a linter or formatter has autofixed
# sources, even if there are no errors
FAIL_IF_UPDATED_SOURCES: false

# Upload reports to file.io
FILEIO_REPORTER: false

# Provides suggestions about different MegaLinter flavors to use to improve
# runtime performance
FLAVOR_SUGGESTIONS: true

# Formatter errors will be reported as errors (and not warnings) if this
# variable is set to false
FORMATTERS_DISABLE_ERRORS: false

# Posts a comment on the pull request with linting results
GITHUB_COMMENT_REPORTER: true

# Sets pull request status checks on GitHub
GITHUB_STATUS_REPORTER: true

# If set to true, MegaLinter will skip files containing @generated marker but
# without @not-generated marker (more info at https://generated.at)
IGNORE_GENERATED_FILES: true

# If set to true, MegaLinter will skip files ignored by git using .gitignore
IGNORE_GITIGNORED_FILES: true

# JavaScript default style to check/apply
JAVASCRIPT_DEFAULT_STYLE: prettier

# Directory for all linter configuration rules
# Can be a local folder or a remote URL
# (ex: https://raw.githubusercontent.com/some_org/some_repo/mega-linter-rules)
LINTER_RULES_PATH: .

# The file name for outputting logs. All output is sent to the log file
# regardless of LOG_LEVEL
LOG_FILE: linter.log

# How much output the script will generate to the console. One of INFO, DEBUG,
# WARNING or ERROR.
LOG_LEVEL: INFO

# Markdown default style to check/apply
MARKDOWN_DEFAULT_STYLE: markdownlint

MARKDOWN_MARKDOWNLINT_FILTER_REGEX_EXCLUDE: __fixtures__

# Generate Markdown summary report
MARKDOWN_SUMMARY_REPORTER: true

# Name of the Markdown summary report file
MARKDOWN_SUMMARY_REPORTER_FILE_NAME: summary.md

# Process linters in parallel to improve overall MegaLinter performance. If
# true, linters of same language or formats are grouped in the same parallel
# process to avoid lock issues if fixing the same files
PARALLEL: true

# All available cores are used by default. If there are too many, you need to
# decrease the number of used cores in order to enhance performance
# PARALLEL_PROCESS_NUMBER: 4

# Directory for generating report files
# Set to none to not generate reports
REPORT_OUTPUT_FOLDER: linter

# Set to simple to avoid external images in generated markdown
REPORTERS_MARKDOWN_TYPE: advanced

# Additional list of secured environment variables to hide when calling linters.
# SECURED_ENV_VARIABLES: []

# Displays elapsed time in reports
SHOW_ELAPSED_TIME: true

# Displays all disabled linters mega-linter could have run
SHOW_SKIPPED_LINTERS: false

# Typescript default style to check/apply
TYPESCRIPT_DEFAULT_STYLE: prettier

# Will parse the entire repository and find all files to validate
# When set to false, only new or edited files will be parsed for validation
VALIDATE_ALL_CODEBASE: true

# Per-linter configuration
JAVASCRIPT_ES_CONFIG_FILE: .eslintrc.yml
JAVASCRIPT_PRETTIER_CONFIG_FILE: prettierrc.yml
JSON_PRETTIER_CONFIG_FILE: prettierrc.yml
MARKDOWN_MARKDOWNLINT_CONFIG_FILE: .markdownlint.yml
TYPESCRIPT_ES_CONFIG_FILE: .eslintrc.yml
TYPESCRIPT_PRETTIER_CONFIG_FILE: .prettierrc.yml
YAML_PRETTIER_CONFIG_FILE: .prettierrc.yml
YAML_YAMLLINT_CONFIG_FILE: .yaml-lint.yml
6 changes: 0 additions & 6 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,3 @@ node_modules/
dist/
coverage/
fixtures/
CODEOWNERS
LICENSE
.gitignore
.prettierignore
*.png
.node-version
20 changes: 20 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"editor.inlineSuggest.enabled": true,
"editor.rulers": [80],
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.tabSize": 2,
"editor.codeActionsOnSave": {
"source.organizeImports": "always"
},
"html.format.templating": true,
"markdown.extension.list.indentationSize": "adaptive",
"markdown.extension.italic.indicator": "_",
"markdown.extension.orderedList.marker": "one",
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[xml]": {
"editor.defaultFormatter": "redhat.vscode-xml"
}
}
51 changes: 51 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Workspace: Lint",
"type": "shell",
"group": "test",
"command": "npx mega-linter-runner --flavor cupcake",
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": []
},
{
"label": "npm: Test",
"type": "shell",
"group": "test",
"command": "npm test",
"options": {
"cwd": "${workspaceFolder}"
}
},
{
"label": "npm: Lint",
"type": "shell",
"group": "test",
"command": "npm run lint",
"options": {
"cwd": "${workspaceFolder}"
}
},
{
"label": "npm: Format (Check)",
"group": "test",
"type": "shell",
"command": "npm run format:check",
"options": {
"cwd": "${workspaceFolder}"
}
},
{
"label": "npm: Format (Write)",
"group": "test",
"type": "shell",
"command": "npm run format:write",
"options": {
"cwd": "${workspaceFolder}"
}
}
]
}
4 changes: 0 additions & 4 deletions .github/linters/.yaml-lint.yml → .yaml-lint.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
###########################
## YAML Linter rules ##
###########################

rules:
document-end: disable
document-start:
Expand Down
23 changes: 19 additions & 4 deletions docs/.eslintrc.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
parser: 'eslint-mdx'
env:
node: true
es6: true
jest: true

globals:
Atomics: readonly
SharedArrayBuffer: readonly

ignorePatterns:
- .cache
- node_modules
- public

parser: eslint-mdx

extends:
- plugin:mdx/recommended
Expand All @@ -7,9 +21,9 @@ extends:

parserOptions:
extensions:
- 'mdx'
- mdx
markdownExtensions:
- 'md'
- md
ignoreRemarkConfig: false

settings:
Expand All @@ -18,4 +32,5 @@ settings:
react:
version: detect

rules: { 'react/no-unescaped-entities': 'off' }
rules:
react/no-unescaped-entities: off
6 changes: 3 additions & 3 deletions docs/content/introduction/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ status: Alpha

export { Layout as default } from '@issue-ops/gatsby-theme-doctocat-typescript'
import { Note } from '@issue-ops/gatsby-theme-doctocat-typescript'
import { BookIcon, PersonIcon } from '@primer/octicons-react'
import { Avatar, Box, StateLabel, Timeline } from '@primer/react'
import { Blankslate } from '@primer/react/drafts'
import { BookIcon, PersonIcon } from '@primer/octicons-react'

## Issues and pull requests

Expand Down Expand Up @@ -102,8 +102,8 @@ Let's use a more practical example...

### Example: GitHub team membership

_**User Story:** As a developer, I should be able to request membership to
various teams and, if approved by administrators, be granted membership._
_**User Story:**_ As a developer, I should be able to request membership to
various teams and, if approved by administrators, be granted membership.

Suppose you are an admin of an organization and would like to reduce the
overhead of managing team membership. You can use IssueOps to build an automated
Expand Down
Loading

0 comments on commit 3c74f5b

Please sign in to comment.