Skip to content

Commit

Permalink
Add eslint and update src to be compliant with lit repo's eslint rule…
Browse files Browse the repository at this point in the history
…set (#144)

* Added eslint with identical settings to lit/lit repo.
* Updated TypeScript src files to satisfy eslint.
* Add the ResizeObserver.js polyfill to the .eslintignore
  • Loading branch information
usergenic authored May 24, 2022
1 parent 227a2ee commit 721b8de
Show file tree
Hide file tree
Showing 14 changed files with 9,618 additions and 7,784 deletions.
9 changes: 9 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
packages/lit-virtualizer/LitVirtualizer.*
packages/lit-virtualizer/Virtualizer.*
packages/lit-virtualizer/lit-virtualizer.*
packages/lit-virtualizer/virtualize.*
packages/lit-virtualizer/test/**/*
packages/lit-virtualizer/polyfills/resize-observer-polyfill/ResizeObserver.js
packages/lit-virtualizer/src/polyfills/resize-observer-polyfill/ResizeObserver.js

packages/lit-virtualizer-examples/
49 changes: 49 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module"
},
"plugins": [
"eslint-plugin-import",
"eslint-plugin-no-only-tests",
"@typescript-eslint"
],
"env": {
"browser": true
},
"rules": {
"import/extensions": ["error", "always"],
"no-prototype-builtins": "off",
"no-only-tests/no-only-tests": "error",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{
"argsIgnorePattern": "^_"
}
]
},
"overrides": [
{
"files": [
"check-version-tracker.js",
"rollup-common.js",
"rollup.config.js",
"web-test-runner.config.js"
],
"env": {
"node": true
}
}
]
}
Loading

0 comments on commit 721b8de

Please sign in to comment.