Skip to content
Draft
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
102 changes: 0 additions & 102 deletions .eslintrc.yaml

This file was deleted.

23 changes: 22 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,30 @@ concurrency:
cancel-in-progress: true

env:
NODE_VERSION: 18
NODE_VERSION: 22

jobs:
lint:
name: Lint
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
submodules: recursive

- name: Set up Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
cache: yarn
node-version: ${{ env.NODE_VERSION }}

- name: Install dependencies
run: script/bootstrap

- name: Lint
run: yarn lint

build_frontend:
name: Test build
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ enableGlobalCache: false

nodeLinker: node-modules

yarnPath: ./homeassistant-frontend/.yarn/releases/yarn-4.5.3.cjs
yarnPath: ./homeassistant-frontend/.yarn/releases/yarn-4.12.0.cjs
57 changes: 57 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import eslint from "@eslint/js";
import tseslint from "typescript-eslint";
import eslintConfigPrettier from "eslint-config-prettier";
import pluginLit from "eslint-plugin-lit";
import pluginWc from "eslint-plugin-wc";
import pluginLitA11y from "eslint-plugin-lit-a11y";
import globals from "globals";

export default tseslint.config(
{
ignores: [
"homeassistant-frontend/**",
"hacs_frontend/**",
"build/**",
"node_modules/**",
"script/**",
],
},
eslint.configs.recommended,
...tseslint.configs.recommended,
pluginLit.configs["flat/recommended"],
pluginWc.configs["flat/recommended"],
pluginLitA11y.configs.recommended,
eslintConfigPrettier,
{
languageOptions: {
ecmaVersion: "latest",
sourceType: "module",
globals: {
...globals.browser,
__DEV__: "readonly",
__DEMO__: "readonly",
__BUILD__: "readonly",
__VERSION__: "readonly",
__STATIC_PATH__: "readonly",
__SUPERVISOR__: "readonly",
},
},
rules: {
"no-bitwise": "error",
"no-console": "error",
"no-restricted-globals": ["error", "event"],
"no-restricted-syntax": ["error", "LabeledStatement", "WithStatement"],
"no-shadow": "off",
"@typescript-eslint/no-shadow": "error",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"wc/no-self-class": "off",
"lit/attribute-value-entities": "off",
},
},
);
2 changes: 1 addition & 1 deletion homeassistant-frontend
Loading