feat: add ESLint, improve types, improve a11y

This commit is contained in:
Jason O'Neill
2022-01-15 21:47:14 -08:00
parent 2ad00deb38
commit 9fb3b5cfed
178 changed files with 17210 additions and 1830 deletions

View File

@@ -32,7 +32,7 @@ fs.mkdirSync(outdir, { recursive: true });
execSync(`node scripts/make-vscode-data.js --outdir "${outdir}"`, { stdio: 'inherit' });
execSync(`node scripts/make-css.js --outdir "${outdir}"`, { stdio: 'inherit' });
execSync(`node scripts/make-icons.js --outdir "${outdir}"`, { stdio: 'inherit' });
if (types) execSync(`tsc --project . --outdir "${outdir}"`, { stdio: 'inherit' });
if (types) execSync(`tsc --project ./tsconfig.prod.json --outdir "${outdir}"`, { stdio: 'inherit' });
} catch (err) {
console.error(chalk.red(err));
process.exit(1);

View File

@@ -1,8 +1,8 @@
//
// This script runs the Custom Elements Manifest analyzer to generate custom-elements.json
//
import commandLineArgs from 'command-line-args';
import { execSync } from 'child_process';
import commandLineArgs from 'command-line-args';
const { outdir } = commandLineArgs({ name: 'outdir', type: String });

View File

@@ -1,7 +1,7 @@
import chalk from 'chalk';
import fs from 'fs';
import del from 'del';
import path from 'path';
import chalk from 'chalk';
import del from 'del';
import { pascalCase } from 'pascal-case';
import prettier from 'prettier';
import prettierConfig from '../prettier.config.cjs';

View File

@@ -1,8 +1,8 @@
import { LitElement, html } from 'lit';
import { customElement, property } from 'lit/decorators.js';
import { emit } from '../../internal/event';
import { watch } from '../../internal/watch';
import styles from './{{ tagWithoutPrefix tag }}.styles';
import { emit } from '~/internal/event';
import { watch } from '~/internal/watch';
/**
* @since 2.0

View File

@@ -1,5 +1,5 @@
import { css } from 'lit';
import componentStyles from '../../styles/component.styles';
import componentStyles from '~/styles/component.styles';
export default css`
${componentStyles}

View File

@@ -1,8 +1,4 @@
import { expect, fixture, html, waitUntil } from '@open-wc/testing';
// import sinon from 'sinon';
import '../../../dist/shoelace.js';
import type {{ properCase tag }} from './{{ tagWithoutPrefix tag }}';
describe('<{{ tag }}>', () => {
it('should render a component', async () => {