mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
chore: add linting config
This commit is contained in:
+4
-1
@@ -34,7 +34,7 @@ __tests__/coverage/
|
||||
# Environment
|
||||
# -------------------------
|
||||
.env
|
||||
.env.*
|
||||
.env.*
|
||||
!.env.example
|
||||
|
||||
# -------------------------
|
||||
@@ -109,6 +109,9 @@ ios/Podfile.lock
|
||||
Podfile.lock
|
||||
Pods/
|
||||
|
||||
# Linting
|
||||
.eslintcache
|
||||
|
||||
# -------------------------
|
||||
# Package Manager Locks
|
||||
# Keep only one when enforcing workspace consistency
|
||||
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"recommendations": [
|
||||
"dbaeumer.vscode-eslint",
|
||||
"hyrious.import-cost",
|
||||
"streetsidesoftware.code-spell-checker",
|
||||
"DavidAnson.vscode-markdownlint"
|
||||
]
|
||||
}
|
||||
Vendored
+53
@@ -0,0 +1,53 @@
|
||||
{
|
||||
// At some point, we'll watch to flick this on and uncomment lines 5 & 6 below.
|
||||
"eslint.enable": false,
|
||||
// Disable the default formatter, use eslint instead
|
||||
// "prettier.enable": false,
|
||||
// "editor.formatOnSave": false,
|
||||
|
||||
// Auto fix
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll.eslint": "explicit",
|
||||
"source.organizeImports": "never"
|
||||
},
|
||||
|
||||
// Silent the stylistic rules in you IDE, but still auto fix them
|
||||
"eslint.rules.customizations": [
|
||||
{ "rule": "style/*", "severity": "off", "fixable": true },
|
||||
{ "rule": "format/*", "severity": "off", "fixable": true },
|
||||
{ "rule": "*-indent", "severity": "off", "fixable": true },
|
||||
{ "rule": "*-spacing", "severity": "off", "fixable": true },
|
||||
{ "rule": "*-spaces", "severity": "off", "fixable": true },
|
||||
{ "rule": "*-order", "severity": "off", "fixable": true },
|
||||
{ "rule": "*-dangle", "severity": "off", "fixable": true },
|
||||
{ "rule": "*-newline", "severity": "off", "fixable": true },
|
||||
{ "rule": "*quotes", "severity": "off", "fixable": true },
|
||||
{ "rule": "*semi", "severity": "off", "fixable": true }
|
||||
],
|
||||
|
||||
// Enable eslint for all supported languages
|
||||
"eslint.validate": [
|
||||
"javascript",
|
||||
"javascriptreact",
|
||||
"typescript",
|
||||
"typescriptreact",
|
||||
"vue",
|
||||
"html",
|
||||
"markdown",
|
||||
"json",
|
||||
"jsonc",
|
||||
"yaml",
|
||||
"toml",
|
||||
"xml",
|
||||
"gql",
|
||||
"graphql",
|
||||
"astro",
|
||||
"svelte",
|
||||
"css",
|
||||
"less",
|
||||
"scss",
|
||||
"pcss",
|
||||
"postcss",
|
||||
"svg"
|
||||
]
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"version": "0.2",
|
||||
"ignorePaths": [],
|
||||
"dictionaryDefinitions": [],
|
||||
"dictionaries": [],
|
||||
"words": [
|
||||
"antfu",
|
||||
"nums"
|
||||
],
|
||||
"ignoreWords": [],
|
||||
"import": []
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
import antfu from '@antfu/eslint-config';
|
||||
|
||||
import jsxA11y from 'eslint-plugin-jsx-a11y';
|
||||
|
||||
export default antfu({
|
||||
react: true,
|
||||
typescript: true,
|
||||
formatters: {
|
||||
css: true,
|
||||
html: true,
|
||||
markdown: 'prettier',
|
||||
svg: 'prettier',
|
||||
},
|
||||
stylistic: {
|
||||
semi: true,
|
||||
spacedComment: true,
|
||||
indent: 2,
|
||||
quotes: 'single',
|
||||
},
|
||||
ignores: ['node_modules', 'dist'],
|
||||
plugins: {
|
||||
'jsx-a11y': jsxA11y,
|
||||
},
|
||||
}, {
|
||||
rules: {
|
||||
'antfu/if-newline': 'off',
|
||||
},
|
||||
}, {
|
||||
files: ['**/*.md'],
|
||||
rules: {
|
||||
'style/max-len': 'off',
|
||||
},
|
||||
});
|
||||
+33
-15
@@ -1,8 +1,20 @@
|
||||
{
|
||||
"name": "vjs-10-monorepo",
|
||||
"version": "1.0.0",
|
||||
"packageManager": "pnpm@10.17.0",
|
||||
"description": "A monorepo for Video.js 10 related library packages",
|
||||
"author": "Video.js Contributors",
|
||||
"license": "Apache-2.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/videojs/vjs-10-monorepo.git"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=22.19.0",
|
||||
"npm": ">=10.9.3"
|
||||
},
|
||||
"scripts": {
|
||||
"//prepare": "simple-git-hooks",
|
||||
"build:libs": "turbo run build --filter=!./examples/*",
|
||||
"build": "turbo run build",
|
||||
"clean": "turbo run clean",
|
||||
@@ -12,27 +24,33 @@
|
||||
"generate:icons": "turbo run generate:icons",
|
||||
"format:check": "prettier . --check --log-level warn --cache",
|
||||
"format": "prettier . --write --log-level warn --cache",
|
||||
"lint": "turbo run lint",
|
||||
"lint": "eslint . --cache",
|
||||
"test": "turbo run test",
|
||||
"typecheck": "pnpm run generate:icons && tsc --build --noEmit"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@ianvs/prettier-plugin-sort-imports": "^4.7.0",
|
||||
"@types/node": "^20.0.0",
|
||||
"@antfu/eslint-config": "^5.4.1",
|
||||
"@eslint-react/eslint-plugin": "^1.53.1",
|
||||
"@eslint/eslintrc": "^3.3.1",
|
||||
"@prettier/plugin-xml": "^3.4.2",
|
||||
"@types/node": "^22.18.6",
|
||||
"eslint": "^9.36.0",
|
||||
"eslint-plugin-format": "^1.0.2",
|
||||
"eslint-plugin-jsx-a11y": "^6.10.2",
|
||||
"eslint-plugin-react": "^7.37.5",
|
||||
"eslint-plugin-react-hooks": "^5.2.0",
|
||||
"eslint-plugin-react-refresh": "^0.4.21",
|
||||
"lint-staged": "^16.2.0",
|
||||
"prettier": "^3.6.2",
|
||||
"react": "^18.0.0",
|
||||
"turbo": "^2.5.5",
|
||||
"react": "^18.3.1",
|
||||
"simple-git-hooks": "^2.13.1",
|
||||
"turbo": "^2.5.8",
|
||||
"typescript": "^5.9.2"
|
||||
},
|
||||
"packageManager": "pnpm@10.17.0",
|
||||
"engines": {
|
||||
"node": ">=22.19.0",
|
||||
"npm": ">=10.9.3"
|
||||
"//simple-git-hooks": {
|
||||
"pre-commit": "pnpm lint-staged"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/videojs/vjs-10-monorepo.git"
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"author": "Video.js Contributors"
|
||||
"//lint-staged": {
|
||||
"*": "eslint --fix"
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+4539
-139
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user