Skip to content

Commit

Permalink
Merge pull request #8 from chrisweb/preview
Browse files Browse the repository at this point in the history
Merge preview into main
  • Loading branch information
chrisweb authored Aug 11, 2024
2 parents 2f1a3f7 + 6e43d2f commit 3fae66a
Show file tree
Hide file tree
Showing 368 changed files with 25,508 additions and 5,272 deletions.
146 changes: 101 additions & 45 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,51 +1,107 @@
module.exports = {
'env': {
'browser': true,
'es2021': true,
'node': true
root: true,
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
'extends': [
'eslint:recommended',
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
'next/core-web-vitals',
],
'overrides': [
],
'parser': '@typescript-eslint/parser',
'parserOptions': {
'ecmaVersion': 'latest',
'sourceType': 'module'
'env': {
browser: true,
es2021: true,
node: true,
},
'plugins': [
'react',
'@typescript-eslint'
ignorePatterns: [
'node_modules/',
'.next/',
'.vscode/',
'public/',
// by default we always ignore our tests folder
// to ensure the tests dont trigger errors in
// staging / production deployments
// comment out the next line to have eslint check
// the test files (in development)
'tests/eslint/',
],
'rules': {
/*'indent': [
'error',
4,
],*/
'quotes': [
'error',
'single',
],
'semi': [
'error',
'never',
],
'@typescript-eslint/naming-convention': [
'error',
{
'selector': 'interface',
'format': [
'PascalCase'
],
'custom': {
'regex': '^I[A-Z]',
'match': true
reportUnusedDisableDirectives: true,
overrides: [
{
files: ['**/*.ts?(x)', '**/*.md?(x)'],
extends: [
'next/core-web-vitals',
],
},
{
files: ['**/*.ts?(x)'],
extends: [
'plugin:@react-three/recommended',
// https://typescript-eslint.io/users/configs#recommended-configurations
'plugin:@typescript-eslint/recommended-type-checked',
'plugin:@typescript-eslint/stylistic-type-checked',
],
parser: '@typescript-eslint/parser',
parserOptions: {
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
warnOnUnsupportedTypeScriptVersion: true,
project: './tsconfig.json',
},
plugins: [
'@typescript-eslint',
],
rules: {
quotes: [
'error',
'single',
{ "allowTemplateLiterals": true },
],
semi: [
'error',
'never',
],
'@typescript-eslint/naming-convention': [
'error',
{
'selector': 'interface',
'format': [
'PascalCase',
],
'custom': {
'regex': '^I[A-Z]',
'match': true,
},
}
],
'@typescript-eslint/consistent-indexed-object-style': 'off',
'@typescript-eslint/ban-ts-comment': [
'error',
{
'ts-expect-error': 'allow-with-description',
'ts-ignore': 'allow-with-description',
'ts-nocheck': false,
'ts-check': false,
minimumDescriptionLength: 3,
},
],
},
},
{
files: ['**/*.md?(x)'],
extends: [
'plugin:mdx/recommended',
],
parser: 'eslint-mdx',
parserOptions: {
markdownExtensions: ['*.md, *.mdx'],
},
settings: {
'mdx/code-blocks': false,
'mdx/remark': true,
},
rules: {
'react/no-unescaped-entities': 0,
}
],
},
}
// markdown rules get configured in remarkrc.mjs
},
],
}
80 changes: 5 additions & 75 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
Expand All @@ -15,93 +12,26 @@ pids
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
# environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# Next.js build output
.next

# Next bundle analyzer
/analyze

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and *not* Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/
# Sentry Config File
.sentryclirc

# TernJS port file
.tern-port
# localhost ssl certificate(s)
certificates
36 changes: 36 additions & 0 deletions .remarkrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// presets imports
import remarkPresetLintRecommended from 'remark-preset-lint-consistent'
import remarkPresetLintConsistent from 'remark-preset-lint-recommended'
import remarkPresetLintMarkdownStyleGuide from 'remark-preset-lint-markdown-style-guide'

// rules imports
import remarkLintMaximumHeadingLength from 'remark-lint-maximum-heading-length'
import remarkLintUnorderedListMarkerStyle from 'remark-lint-unordered-list-marker-style'
import remarkLintNoUndefinedReferences from 'remark-lint-no-undefined-references'
import remarkLintLinkTitleStyle from 'remark-lint-link-title-style'
import remarkLintMaximumLineLength from 'remark-lint-maximum-line-length'
import remarkLintListItemSpacing from 'remark-lint-list-item-spacing'

const config = {
plugins: [
// presets
remarkPresetLintRecommended,
remarkPresetLintConsistent,
remarkPresetLintMarkdownStyleGuide,
// rules
// https://www.npmjs.com/package/remark-lint-maximum-heading-length
[remarkLintMaximumHeadingLength, [1, 100]],
// https://www.npmjs.com/package/remark-lint-unordered-list-marker-style
[remarkLintUnorderedListMarkerStyle, 'consistent'],
// https://www.npmjs.com/package/remark-lint-no-undefined-references
[remarkLintNoUndefinedReferences, { allow: ['!NOTE', '!TIP', '!MORE', '!WARN', ' ', 'x'] }],
// https://www.npmjs.com/package/remark-lint-link-title-style
[remarkLintLinkTitleStyle, '\''],
// https://www.npmjs.com/package/remark-lint-maximum-line-length
[remarkLintMaximumLineLength, false],
// https://www.npmjs.com/package/remark-lint-list-item-spacing
[remarkLintListItemSpacing, false],
]
}

export default config
40 changes: 38 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,40 @@
{
"typescript.tsdk": "node_modules\\typescript\\lib",
"typescript.enablePromptUseWorkspaceTsdk": true
"typescript.tsdk": "node_modules\\typescript\\lib",
"typescript.enablePromptUseWorkspaceTsdk": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "never"
},
"eslint.debug": true,
"eslint.options": {
"extensions": [
".js",
".jsx",
".md",
".mdx",
".ts",
".tsx"
]
},
"eslint.validate": [
"markdown",
"mdx",
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
],
"files.associations": {
"*.mdx": "markdown"
},
"eslint.onIgnoredFiles": "warn",
"eslint.probe": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"html",
"vue",
"markdown",
"mdx"
],
}
Loading

0 comments on commit 3fae66a

Please sign in to comment.