 dec8cfbb39
			
		
	
	dec8cfbb39
	
	
	
		
			
			* Just cleaning up. * web: removing sonarjs from yet another branch. * web: everything except the tests are up-to-date. There was a lot, it turns out, we simply weren't using. * web: update package.json to support WebdriverIO 9 This commit: - Upgrades to WebdriverIO 9.1.2 - Resets our `devDependencies` collection to remove all imports that we either were not using or were duplicates of existing dependencies: - *Babel*, of all things - Storybook addon css user preferences, now native to Storybook 8 - SonarJS, *again*, sigh. - React - Fixes a bug where ESLint would report missing features in our build scripts - Fixes a bug where Wdio might not reach a headless browser before timeout - Replaces Rollup's CSSLit with Vite's CSSLit, which actually works without hacks, for testing. - Moves the package-lock scanner to its own script, with better reporting and tool verification, which also cleans up the package.lock file a little. * Prettier just havin' all the opinions.
		
			
				
	
	
		
			82 lines
		
	
	
		
			2.5 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			82 lines
		
	
	
		
			2.5 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| import eslint from "@eslint/js";
 | |
| import tsparser from "@typescript-eslint/parser";
 | |
| import litconf from "eslint-plugin-lit";
 | |
| import wcconf from "eslint-plugin-wc";
 | |
| import globals from "globals";
 | |
| import tseslint from "typescript-eslint";
 | |
| 
 | |
| export default [
 | |
|     // You would not believe how much this change has frustrated users: ["if an ignores key is used
 | |
|     // without any other keys in the configuration object, then the patterns act as global
 | |
|     // ignores"](https://eslint.org/docs/latest/use/configure/ignore)
 | |
|     {
 | |
|         ignores: [
 | |
|             "dist/",
 | |
|             ".wireit/",
 | |
|             "packages/",
 | |
|             // don't ever lint node_modules
 | |
|             "node_modules/",
 | |
|             ".storybook/*",
 | |
|             // don't lint build output (make sure it's set to your correct build folder name)
 | |
|             // don't lint nyc coverage output
 | |
|             "coverage/",
 | |
|             "src/locale-codes.ts",
 | |
|             "storybook-static/",
 | |
|             "src/locales/",
 | |
|         ],
 | |
|     },
 | |
|     eslint.configs.recommended,
 | |
|     wcconf.configs["flat/recommended"],
 | |
|     litconf.configs["flat/recommended"],
 | |
|     ...tseslint.configs.recommended,
 | |
|     {
 | |
|         languageOptions: {
 | |
|             parser: tsparser,
 | |
|             parserOptions: {
 | |
|                 ecmaVersion: 12,
 | |
|                 sourceType: "module",
 | |
|             },
 | |
|         },
 | |
|         files: ["src/**"],
 | |
|         rules: {
 | |
|             "no-unused-vars": "off",
 | |
|             "no-console": ["error", { allow: ["debug", "warn", "error"] }],
 | |
|             "@typescript-eslint/ban-ts-comment": "off",
 | |
|             "@typescript-eslint/no-unused-vars": [
 | |
|                 "error",
 | |
|                 {
 | |
|                     argsIgnorePattern: "^_",
 | |
|                     varsIgnorePattern: "^_",
 | |
|                     caughtErrorsIgnorePattern: "^_",
 | |
|                 },
 | |
|             ],
 | |
|         },
 | |
|     },
 | |
|     {
 | |
|         languageOptions: {
 | |
|             parser: tsparser,
 | |
|             parserOptions: {
 | |
|                 ecmaVersion: 12,
 | |
|                 sourceType: "module",
 | |
|             },
 | |
|             globals: {
 | |
|                 ...globals.nodeBuiltin,
 | |
|             },
 | |
|         },
 | |
|         files: ["scripts/*.mjs", "*.ts", "*.mjs"],
 | |
|         rules: {
 | |
|             "no-unused-vars": "off",
 | |
|             "no-console": "off",
 | |
|             "@typescript-eslint/ban-ts-comment": "off",
 | |
|             "@typescript-eslint/no-unused-vars": [
 | |
|                 "error",
 | |
|                 {
 | |
|                     argsIgnorePattern: "^_",
 | |
|                     varsIgnorePattern: "^_",
 | |
|                     caughtErrorsIgnorePattern: "^_",
 | |
|                 },
 | |
|             ],
 | |
|         },
 | |
|     },
 | |
| ];
 |