Skip to content
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 108 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
{
"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/**/*"]
},
{
"extends": ["./second-gen/.eslintrc.json"],
"files": ["second-gen/**/*"]
}
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2020,
"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 }}'
12 changes: 12 additions & 0 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 @@ -221,10 +222,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
16 changes: 12 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,18 @@
},
"type": "module",
"scripts": {
"build": "yarn workspace @adobe/spectrum-web-components build",
"test": "yarn workspace @adobe/spectrum-web-components test",
"start": "yarn workspace @adobe/spectrum-web-components storybook",
"lint": "yarn workspace @adobe/spectrum-web-components lint",
"build-first-gen": "yarn workspace @adobe/spectrum-web-components build",
"build-second-gen": "yarn workspace @adobe/swc build",
"build": "yarn build-first-gen && yarn build-second-gen",
"test-first-gen": "yarn workspace @adobe/spectrum-web-components test",
"test-second-gen": "yarn workspace @adobe/swc test",
"test": "yarn test-first-gen && yarn test-second-gen",
"start-first-gen": "yarn workspace @adobe/spectrum-web-components start",
"start-second-gen": "yarn workspace @adobe/swc start",
"start": "yarn start-first-gen & yarn start-second-gen",
"lint-first-gen": "yarn workspace @adobe/spectrum-web-components lint",
"lint-second-gen": "yarn workspace @adobe/swc lint",
"lint": "yarn lint-first-gen & yarn lint-second-gen",
"postinstall": "husky || true && patch-package"
},
"workspaces": [
Expand Down
8 changes: 4 additions & 4 deletions second-gen/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@adobe/spectrum-web-components-2nd-gen",
"name": "@adobe/swc",
"version": "0.0.1",
"private": true,
"description": "Second generation Spectrum Web Components with modern tooling and architecture",
Expand All @@ -16,10 +16,10 @@
},
"type": "module",
"scripts": {
"build": "yarn workspaces foreach --from '@swc/*' run build",
"clean": "yarn workspaces foreach --from '@swc/*' run clean",
"build": "yarn workspaces foreach --from '@swc/*' --recursive run build",
"clean": "yarn workspaces foreach --from '@swc/*' --recursive run clean",
"lint": "eslint . --ext .ts,.js,.json",
"storybook": "yarn workspace @swc/components storybook",
"start": "yarn workspace @swc/components storybook",
"storybook:build": "yarn workspace @swc/components storybook:build",
"test": "yarn workspace @swc/components test"
},
Expand Down
16 changes: 8 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,6 @@ __metadata:
languageName: node
linkType: hard

"@adobe/spectrum-web-components-2nd-gen@workspace:second-gen":
version: 0.0.0-use.local
resolution: "@adobe/spectrum-web-components-2nd-gen@workspace:second-gen"
dependencies:
eslint-plugin-simple-import-sort: "npm:^12.1.1"
languageName: unknown
linkType: soft

"@adobe/spectrum-web-components-monorepo@workspace:.":
version: 0.0.0-use.local
resolution: "@adobe/spectrum-web-components-monorepo@workspace:."
Expand Down Expand Up @@ -308,6 +300,14 @@ __metadata:
languageName: unknown
linkType: soft

"@adobe/swc@workspace:second-gen":
version: 0.0.0-use.local
resolution: "@adobe/swc@workspace:second-gen"
dependencies:
eslint-plugin-simple-import-sort: "npm:^12.1.1"
languageName: unknown
linkType: soft

"@ampproject/remapping@npm:^2.3.0":
version: 2.3.0
resolution: "@ampproject/remapping@npm:2.3.0"
Expand Down
Loading