Skip to content

Commit

Permalink
Add linting
Browse files Browse the repository at this point in the history
  • Loading branch information
nathan-gs committed Jun 3, 2024
1 parent ee78dc6 commit f6f6cd8
Show file tree
Hide file tree
Showing 4 changed files with 1,947 additions and 82 deletions.
12 changes: 12 additions & 0 deletions devenv.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
npm run watch
'';

scripts.copy-to-ha.exec = ''
npm run build
sudo cp dist/map-card.js /var/lib/hass/www
'';


scripts.get-version.exec = ''
jq -r '.version' package.json
'';
Expand All @@ -30,11 +36,17 @@
sed -i "s/HA_MAP_CARD_VERSION/$VERSION/" dist/map-card.js
echo $VERSION
git tag v$VERSION
'';

enterShell = ''
npm install
'';

enterTest = ''
npm run lint
'';


}
8 changes: 8 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import globals from "globals";
import pluginJs from "@eslint/js";


export default [
{languageOptions: { globals: globals.browser }},
pluginJs.configs.recommended,
];
Loading

0 comments on commit f6f6cd8

Please sign in to comment.