Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
126 changes: 126 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
{
"env": {
"browser": true,
"es6": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended"
],
"overrides": [
{
"extends": ["plugin:jsonc/recommended-with-jsonc"],
"files": ["*.json"],
"parser": "jsonc-eslint-parser",
"rules": {
"jsonc/sort-keys": ["warn"]
}
},
{
"extends": ["plugin:jsonc/recommended-with-jsonc"],
"files": ["package.json"],
"parser": "jsonc-eslint-parser",
"rules": {
"jsonc/sort-keys": [
"warn",
{
"hasProperties": ["type"],
"order": [
"$schema",
"name",
"version",
"private",
"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": "asc" },
"pathPattern": "^(?!exports\\[).*"
}
]
}
},
{
"extends": ["./first-gen/.eslintrc.json"],
"files": ["first-gen/**/*"],
"rules": {
"notice/notice": [
"error",
{
"mustMatch": "Copyright [0-9]{0,4} Adobe. All rights reserved.",
"templateFile": "config/license.js"
}
]
}
},
{
"extends": ["./second-gen/.eslintrc.json"],
"files": ["second-gen/**/*"],
"rules": {
"notice/notice": [
"error",
{
"mustMatch": "Copyright [0-9]{0,4} Adobe. All rights reserved.",
"templateFile": "../../../config/license.js"
}
]
}
}
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["@typescript-eslint"],
"root": true,
"rules": {
"no-console": [
"error",
{
"allow": ["warn", "error"]
}
],
"no-debugger": 2
}
}
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,4 @@ jobs:
level: error
reporter: github-pr-review
filter_mode: diff_context
eslint_flags: '${{ needs.changed_files.outputs.eslint_added_files }} ${{ needs.changed_files.outputs.eslint_modified_files }}'
eslint_flags: '--config .eslintrc.json ${{ needs.changed_files.outputs.eslint_added_files }} ${{ needs.changed_files.outputs.eslint_modified_files }}'
File renamed without changes.
10 changes: 1 addition & 9 deletions first-gen/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,11 @@
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2020,
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [
"@typescript-eslint",
"notice",
"@spectrum-web-components",
"import",
"require-extensions"
Expand Down Expand Up @@ -150,13 +149,6 @@
}
],
"no-debugger": 2,
"notice/notice": [
"error",
{
"mustMatch": "Copyright [0-9]{0,4} Adobe. All rights reserved.",
"templateFile": "first-gen/config/license.js"
}
],
"sort-imports": [
"error",
{
Expand Down
18 changes: 16 additions & 2 deletions first-gen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"scripts": {
"analyze": "lit-analyzer \"{packages,tools}/*/src/**/!(*.css).ts\"",
"build": "wireit",
"prebuild": "wireit",
"build:clear-cache": "rimraf packages/*/tsconfig.tsbuildinfo && rimraf tools/*/tsconfig.tsbuildinfo",
"build:confirm": "node ./scripts/confirm-build.js",
"build:css": "wireit",
Expand Down Expand Up @@ -62,7 +63,8 @@
"process-icons": "wireit",
"publish:react": "yarn changeset publish --no-git-tag --tag latest --no-push",
"push-to-remote": "git add . && git commit -m \"chore: release new versions #publish\" && git push",
"start": "yarn storybook",
"dev:core": "yarn workspace @swc/core dev",
"start": "run-p dev:core storybook",
"storybook": "wireit",
"storybook:build": "NODE_ENV=production storybook build -o projects/documentation/dist/storybook -c storybook",
"storybook:quick": "run-p build:watch storybook:run",
Expand All @@ -82,7 +84,7 @@
"test:visual:clean:current": "rimraf test/visual/screenshots-current",
"test:watch": "yarn test:watch:focus unit",
"test:watch:flags:focus": "yarn build && run-p build:watch \"test:start --watch --group {1} --config web-test-runner.config.ci-chromium-flags.js\" --",
"test:watch:focus": "yarn build && run-p build:watch \"test:start --watch --group {1}\" --",
"test:watch:focus": "yarn dev:core & yarn build && run-p build:watch \"test:start --watch --group {1}\" --",
"version:update": "genversion --verbose --semi --esm ./tools/base/src/version.js",
"vrt:preview": "yarn wds --config test/visual/wds-vrt.config.js"
},
Expand Down Expand Up @@ -221,10 +223,21 @@
"wireit": {
"build": {
"dependencies": [
"prebuild",
"build:ts",
"build:types"
]
},
"prebuild": {
"command": "yarn workspace @swc/core build",
"files": [
"../second-gen/packages/core/components/**/*",
"../second-gen/packages/core/shared/**/*",
"../second-gen/packages/core/package.json",
"../second-gen/packages/core/vite.config.js",
"../second-gen/packages/core/tsconfig.json"
]
},
"build:css": {
"clean": "if-file-deleted",
"command": "node ./scripts/build-css.js",
Expand Down Expand Up @@ -396,6 +409,7 @@
"storybook": {
"command": "storybook dev -p 8080 -c storybook",
"dependencies": [
"build:ts",
"build:watch",
"prestorybook"
],
Expand Down
61 changes: 30 additions & 31 deletions first-gen/packages/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,48 +142,30 @@
"@spectrum-web-components",
"import"
],
"root": true,
"rules": {
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": false,
"optionalDependencies": false,
"peerDependencies": false
}
],
"no-debugger": 2,
"no-console": [
"error",
{
"allow": ["warn", "error"]
}
],
"@spectrum-web-components/document-active-element": ["error"],
"@spectrum-web-components/prevent-argument-names": [
"error",
["e", "ev", "evt", "err"]
],
"@spectrum-web-components/document-active-element": ["error"],
"notice/notice": [
"error",
{
"mustMatch": "Copyright [0-9]{0,4} Adobe. All rights reserved.",
"templateFile": "first-gen/config/license.js"
}
],
"@typescript-eslint/explicit-function-return-type": [
1,
{
"allowExpressions": true
}
],
"sort-imports": [
"@typescript-eslint/no-unused-vars": [
"error",
{
"ignoreCase": true,
"ignoreDeclarationSort": true,
"ignoreMemberSort": false,
"allowSeparatedGroups": false
"argsIgnorePattern": "^_"
}
],
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": false,
"optionalDependencies": false,
"peerDependencies": false
}
],
"lit-a11y/click-events-have-key-events": [
Expand All @@ -201,10 +183,27 @@
]
}
],
"@typescript-eslint/no-unused-vars": [
"no-console": [
"error",
{
"argsIgnorePattern": "^_"
"allow": ["warn", "error"]
}
],
"no-debugger": 2,
"notice/notice": [
"error",
{
"mustMatch": "Copyright [0-9]{0,4} Adobe. All rights reserved.",
"templateFile": "config/license.js"
}
],
"sort-imports": [
"error",
{
"allowSeparatedGroups": false,
"ignoreCase": true,
"ignoreDeclarationSort": true,
"ignoreMemberSort": false
}
]
}
Expand Down
Loading
Loading