Skip to content

Commit 2aa3582

Browse files
committed
chore: update open-wc setup to match state-of-the-art
1 parent 1fab346 commit 2aa3582

19 files changed

+416
-496
lines changed

.babelrc

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"plugins": [
3+
[
4+
"@babel/plugin-proposal-decorators",
5+
{
6+
"decoratorsBeforeExport": true
7+
}
8+
],
9+
"@babel/plugin-proposal-class-properties"
10+
],
11+
"presets": [
12+
"@babel/preset-typescript"
13+
]
14+
}

.editorconfig

-3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,3 @@ end_of_line = lf
33
indent_size = 2
44
indent_style = space
55
trim_trailing_whitespace = true
6-
7-
[*.ts]
8-
indent_size = 4

.eslintignore

-1
This file was deleted.

.eslintrc.json

+30-8
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
{
22
"root": true,
33
"extends": [
4-
"standard",
5-
"plugin:@typescript-eslint/recommended"
4+
"@open-wc/eslint-config",
5+
"eslint-config-prettier",
6+
"plugin:@typescript-eslint/recommended",
7+
"standard"
68
],
79
"env": {
810
"browser": true
@@ -14,12 +16,32 @@
1416
},
1517
"plugins": [
1618
"@typescript-eslint/eslint-plugin",
17-
"mocha"
19+
"lit"
1820
],
1921
"rules": {
20-
"quotes": ["error", "single", { "avoidEscape": true }],
21-
"comma-dangle": ["error", "always-multiline"],
22-
"@typescript-eslint/explicit-function-return-type": "off",
23-
"@typescript-eslint/indent": "off"
24-
}
22+
"indent": "off",
23+
"import/no-unresolved": "warn",
24+
"import/extensions": "off",
25+
"space-before-function-paren": [
26+
"error",
27+
{
28+
"named": "never"
29+
}
30+
],
31+
"comma-dangle": [
32+
"error",
33+
"always-multiline"
34+
],
35+
"@typescript-eslint/no-var-requires": "warn",
36+
"@typescript-eslint/indent": ["error", 2],
37+
"import/no-extraneous-dependencies": ["error", {"devDependencies": true, "optionalDependencies": true, "peerDependencies": true}]
38+
},
39+
"overrides": [
40+
{
41+
"files": ["test/*.ts", "snapshot/*.ts"],
42+
"rules": {
43+
"no-unused-expressions": "off"
44+
}
45+
}
46+
]
2547
}

.gitignore

+7-184
Original file line numberDiff line numberDiff line change
@@ -1,186 +1,9 @@
1-
2-
# Created by https://www.gitignore.io/api/node,polymer,typings,webstorm+all
3-
# Edit at https://www.gitignore.io/?templates=node,polymer,typings,webstorm+all
4-
5-
### Node ###
6-
# Logs
7-
logs
8-
*.log
9-
npm-debug.log*
10-
yarn-debug.log*
11-
yarn-error.log*
12-
13-
# Runtime data
14-
pids
15-
*.pid
16-
*.seed
17-
*.pid.lock
18-
19-
# Directory for instrumented libs generated by jscoverage/JSCover
20-
lib-cov
21-
22-
# Coverage directory used by tools like istanbul
23-
coverage
24-
25-
# nyc test coverage
26-
.nyc_output
27-
28-
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
29-
.grunt
30-
31-
# Bower dependency directory (https://bower.io/)
32-
bower_components
33-
34-
# node-waf configuration
35-
.lock-wscript
36-
37-
# Compiled binary addons (https://nodejs.org/api/addons.html)
38-
build/Release
39-
40-
# Dependency directories
411
node_modules/
42-
jspm_packages/
43-
44-
# TypeScript v1 declaration files
45-
typings/
46-
*.d.ts
47-
48-
# Optional npm cache directory
49-
.npm
50-
51-
# Optional eslint cache
52-
.eslintcache
53-
54-
# Optional REPL history
55-
.node_repl_history
56-
57-
# Output of 'npm pack'
58-
*.tgz
59-
60-
# Yarn Integrity file
61-
.yarn-integrity
62-
63-
# dotenv environment variables file
64-
.env
65-
66-
# parcel-bundler cache (https://parceljs.org/)
67-
.cache
68-
69-
# next.js build output
70-
.next
71-
72-
# nuxt.js build output
73-
.nuxt
74-
75-
# vuepress build output
76-
.vuepress/dist
77-
78-
# Serverless directories
79-
.serverless/
80-
81-
# FuseBox cache
82-
.fusebox/
83-
84-
#DynamoDB Local files
85-
.dynamodb/
86-
87-
### Polymer ###
88-
#Installed components via bower
89-
bower_components/
90-
91-
#Installed modules via npm
92-
93-
#Polymer-cli builds
94-
build/
95-
96-
### Typings ###
97-
## Ignore downloaded typings
98-
typings
99-
100-
### WebStorm+all ###
101-
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
102-
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
103-
104-
# User-specific stuff
105-
.idea/**/workspace.xml
106-
.idea/**/tasks.xml
107-
.idea/**/usage.statistics.xml
108-
.idea/**/dictionaries
109-
.idea/**/shelf
110-
111-
# Generated files
112-
.idea/**/contentModel.xml
113-
114-
# Sensitive or high-churn files
115-
.idea/**/dataSources/
116-
.idea/**/dataSources.ids
117-
.idea/**/dataSources.local.xml
118-
.idea/**/sqlDataSources.xml
119-
.idea/**/dynamic.xml
120-
.idea/**/uiDesigner.xml
121-
.idea/**/dbnavigator.xml
122-
123-
# Gradle
124-
.idea/**/gradle.xml
125-
.idea/**/libraries
126-
127-
# Gradle and Maven with auto-import
128-
# When using Gradle or Maven with auto-import, you should exclude module files,
129-
# since they will be recreated, and may cause churn. Uncomment if using
130-
# auto-import.
131-
# .idea/modules.xml
132-
# .idea/*.iml
133-
# .idea/modules
134-
135-
# CMake
136-
cmake-build-*/
137-
138-
# Mongo Explorer plugin
139-
.idea/**/mongoSettings.xml
140-
141-
# File-based project format
142-
*.iws
143-
144-
# IntelliJ
145-
out/
146-
147-
# mpeltonen/sbt-idea plugin
148-
.idea_modules/
149-
150-
# JIRA plugin
151-
atlassian-ide-plugin.xml
152-
153-
# Cursive Clojure plugin
154-
.idea/replstate.xml
155-
156-
# Crashlytics plugin (for Android Studio and IntelliJ)
157-
com_crashlytics_export_strings.xml
158-
crashlytics.properties
159-
crashlytics-build.properties
160-
fabric.properties
161-
162-
# Editor-based Rest Client
163-
.idea/httpRequests
164-
165-
# Android studio 3.1+ serialized cache file
166-
.idea/caches/build_file_checksums.ser
167-
168-
### WebStorm+all Patch ###
169-
# Ignores the whole .idea folder and all .iml files
170-
# See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360
171-
172-
.idea/
173-
174-
# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023
175-
176-
*.iml
177-
modules.xml
178-
.idea/misc.xml
179-
*.ipr
180-
181-
# End of https://www.gitignore.io/api/node,polymer,typings,webstorm+all
182-
183-
lib/*.js
184-
/*-*.js
185-
2+
*.js
1863
*.js.map
4+
*.d.ts
5+
!*.config.js
6+
!*.conf.js
7+
/lib/
8+
/coverage/
9+
*.log

.travis.yml

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ node_js:
55
before_install:
66
- npm install -g codecov
77
script:
8+
- npm run lint
89
- npm run test
910
- npm run test:bs
1011
after_success:

0 commit comments

Comments
 (0)