Skip to content

Commit 2b255b2

Browse files
committed
Add TypeScript, ESLint, and prettier
1 parent faf2600 commit 2b255b2

File tree

14 files changed

+3178
-564
lines changed

14 files changed

+3178
-564
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
build/

.eslintrc.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"root": true,
3+
"env": {
4+
"browser": true,
5+
"es6": true,
6+
"node": true
7+
},
8+
"parser": "@typescript-eslint/parser",
9+
"plugins": ["@typescript-eslint"],
10+
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"]
11+
}

.gitignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
cqfill.js
2-
cqfill.min.js
3-
cqfill.iife.min.js
1+
build
42
node_modules

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
build/
2+
tests/*.html

.prettierrc.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"bracketSpacing": false,
3+
"singleQuote": true,
4+
"trailingComma": "es5",
5+
"arrowParens": "avoid"
6+
}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ A tiny polyfill for [CSS Container Queries][mdn], weighing about 1.6kB brotli’
77
Ideally, the polyfill is only loaded if the browser doesn’t support Container Queries natively. In a modern setup with a bundler that uses ES modules, the following snippet should work:
88

99
```js
10-
const supportsContainerQueries = "container" in document.documentElement.style;
10+
const supportsContainerQueries = 'container' in document.documentElement.style;
1111
if (!supportsContainerQueries) {
12-
import("container-query-polyfill");
12+
import('container-query-polyfill');
1313
}
1414
```
1515

0 commit comments

Comments
 (0)