Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: linting pass 1 #5000

Open
wants to merge 9 commits into
base: garage-week/docsapalooza
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 0 additions & 7 deletions .editorconfig

This file was deleted.

316 changes: 230 additions & 86 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,93 +1,237 @@
{
"root": true,
"plugins": [
"@typescript-eslint",
"notice",
"@spectrum-web-components",
"import",
"require-extensions",
"@stylistic"
],
"env": {
"browser": true,
"node": true,
"es6": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module"
"env": {
"browser": true,
"es6": true,
"node": true
},
"extends": [
"plugin:lit-a11y/recommended",
"plugin:require-extensions/recommended",
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
],
"overrides": [
{
"files": ["tasks/*", "scripts/*"],
"rules": {
"no-console": ["off"]
}
},
"rules": {
"curly": ["error", "all"],
"no-debugger": 2,
"no-console": [
"error",
{
"allow": ["warn", "error"]
}
],
"import/extensions": [
"error",
"ignorePackages",
{
"ts": "never"
}
],
"import/prefer-default-export": "off",
"@spectrum-web-components/prevent-argument-names": [
"error",
["e", "ev", "evt", "err"]
{
"extends": ["plugin:jsonc/recommended-with-jsonc"],
"files": ["*.json"],
"parser": "jsonc-eslint-parser",
"rules": {
"jsonc/sort-keys": [
"warn",
{
// Hits the all properties
"hasProperties": ["type"],
"order": [
"type",
"properties",
"items",
"required",
"minItems",
"additionalProperties",
"additionalItems"
],
"pathPattern": ".*"
},
{
"order": {
"type": "asc"
},
"pathPattern": ".*"
}
],
"notice/notice": [
"error",
{
"mustMatch": "Copyright [0-9]{0,4} Adobe. All rights reserved.",
"templateFile": "config/license.js"
}
],
"sort-imports": [
"error",
{
"ignoreCase": true,
"ignoreDeclarationSort": true,
"ignoreMemberSort": false,
"allowSeparatedGroups": false
}
],
"lit-a11y/click-events-have-key-events": [
"error",
{
"allowList": [
"sp-button",
"sp-action-button",
"sp-checkbox",
"sp-radio",
"sp-switch",
"sp-menu-item",
"sp-clear-button",
"sp-underlay"
]
}
],
"@stylistic/padding-line-between-statements": [
"error",
{ "blankLine": "always", "prev": "*", "next": "return" }
"notice/notice": 0
}
},
{
"files": ["package.json"],
"rules": {
"jsonc/sort-keys": [
"warn",
{
"order": [
"$schema",
"private",
"name",
"version",
"description",
"license",
"author",
"maintainers",
"contributors",
"homepage",
"repository",
"bugs",
"type",
"exports",
"main",
"module",
"browser",
"man",
"preferGlobal",
"bin",
"files",
"directories",
"scripts",
"config",
"sideEffects",
"types",
"typings",
"workspaces",
"resolutions",
"dependencies",
"bundleDependencies",
"bundledDependencies",
"peerDependencies",
"peerDependenciesMeta",
"optionalDependencies",
"devDependencies",
"keywords",
"engines",
"engineStrict",
"os",
"cpu",
"publishConfig"
],
"pathPattern": "^$"
},
{
"order": ["type", "url", "directory"],
"pathPattern": "^repository$"
},
{
"order": {
"type": "asc"
},
"pathPattern": ".*"
}
]
}
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"plugin:lit-a11y/recommended",
"plugin:require-extensions/recommended"
{
"files": [
"packages/*/stories/*.js",
"tools/*/stories/*.js",
"storybook/*.js",
"storybook/**/*.js"
],
"parserOptions": {
"ecmaFeatures": {
"impliedStrict": true
},
"ecmaVersion": "latest",
"sourceType": "module"
}
}
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module"
},
"plugins": [
"@spectrum-web-components",
"@stylistic",
"@typescript-eslint",
"import",
"notice",
"require-extensions"
],
"root": true,
"rules": {
"@spectrum-web-components/prevent-argument-names": [
"error",
["e", "ev", "evt", "err"]
],
"@stylistic/padding-line-between-statements": [
"error",
{
"blankLine": "always",
"next": ["return", "if", "try", "switch"],
"prev": "*"
},
{
"blankLine": "always",
"next": "*",
"prev": ["const", "let", "var", "if", "try", "switch"]
},
{
"blankLine": "any",
"next": ["const", "let", "var"],
"prev": ["const", "let", "var"]
}
],
"curly": ["error", "all"],
"func-call-spacing": ["warn", "never"],
"import/extensions": [
"error",
"ignorePackages",
{
"ts": "never"
}
],
"import/prefer-default-export": "off",
"indent": [
"warn",
2,
{
"SwitchCase": 1,
"ignoredNodes": ["TemplateLiteral *"]
}
],
"linebreak-style": ["warn", "unix"],
"lit-a11y/click-events-have-key-events": [
"error",
{
"allowList": [
"sp-button",
"sp-action-button",
"sp-checkbox",
"sp-radio",
"sp-switch",
"sp-menu-item",
"sp-clear-button",
"sp-underlay"
]
}
],
"no-console": [
"warn",
{
"allow": ["warn", "error"]
}
],
"no-debugger": 2,
"no-mixed-spaces-and-tabs": ["error", "smart-tabs"],
"notice/notice": [
"error",
{
"mustMatch": "Copyright [0-9]{0,4} Adobe. All rights reserved.",
"templateFile": "config/license.js"
}
],
"quotes": [
"warn",
"double",
{
"avoidEscape": true
}
],
"semi": ["warn", "always"],
"sort-imports": [
"error",
{
// "allowSeparatedGroups": false,
"ignoreCase": true,
"ignoreDeclarationSort": true
// "ignoreMemberSort": false
}
],
"overrides": [
{
"files": ["tasks/*", "scripts/*"],
"rules": {
"no-console": ["off"]
}
}
]
"space-before-blocks": ["warn", "always"]
}
}
11 changes: 6 additions & 5 deletions .prettierrc.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
printWidth: 80
tabWidth: 4
semi: true
singleQuote: true
trailingComma: es5
tabWidth: 2
useTabs: false
# semi: true
singleQuote: false
# trailingComma: es5
bracketSpacing: true
arrowParens: always
htmlWhitespaceSensitivity: ignore
# htmlWhitespaceSensitivity: ignore
Loading
Loading