Skip to content

Commit

Permalink
fix: add eslint config (#649)
Browse files Browse the repository at this point in the history
  • Loading branch information
manucorporat authored Jun 20, 2022
1 parent a50ab03 commit 90c25d9
Show file tree
Hide file tree
Showing 13 changed files with 89 additions and 12 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ tsdoc-metadata.json
scripts/**/*
*.tsbuildinfo
packages/docs/src/pages/examples/**/*
vite.config.ts
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "qwik-monorepo",
"version": "0.0.28",
"version": "0.0.29",
"scripts": {
"build": "yarn node scripts --tsc --build --api --platform-binding-wasm-copy",
"build.full": "yarn node scripts --tsc --build --api --eslint --qwikcity --platform-binding --wasm",
Expand Down
2 changes: 1 addition & 1 deletion packages/create-qwik/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-qwik",
"version": "0.0.28",
"version": "0.0.29",
"description": "Interactive CLI and API for generating Qwik projects.",
"bin": "create-qwik",
"main": "index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"devDependencies": {
"@builder.io/partytown": "^0.6.1",
"@builder.io/qwik": "0.0.27",
"@builder.io/qwik": "0.0.28",
"@builder.io/qwik-city": "0.0.12",
"@cloudflare/kv-asset-handler": "0.2.0",
"autoprefixer": "10.4.7",
Expand Down
5 changes: 5 additions & 0 deletions packages/eslint-plugin-qwik/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
# eslint-plugin-qwik

## Implemented

- `no-use-after-await` (deprecated)
- `valid-lexical-scope`
1 change: 1 addition & 0 deletions packages/eslint-plugin-qwik/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export const configs = {
plugins: ['qwik'],
rules: {
'qwik/no-use-after-await': 'error',
'qwik/valid-lexical-scope': 'error',
},
},
strict: {
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-qwik/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-qwik",
"version": "0.0.28",
"version": "0.0.29",
"description": "An Open-Source sub-framework designed with a focus on server-side-rendering, lazy-loading, and styling/animation.",
"main": "index.js",
"author": "Builder Team",
Expand Down
2 changes: 1 addition & 1 deletion packages/qwik-city/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@builder.io/qwik": ">=0.0.22"
},
"devDependencies": {
"@builder.io/qwik": "0.0.27",
"@builder.io/qwik": "0.0.28",
"@microsoft/api-extractor": "7.24.2",
"@types/github-slugger": "^1.3.0",
"@types/marked": "^4.0.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/qwik/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@builder.io/qwik",
"version": "0.0.28",
"version": "0.0.29",
"description": "An Open-Source sub-framework designed with a focus on server-side-rendering, lazy-loading, and styling/animation.",
"main": "./dist/core.cjs",
"module": "./dist/core.mjs",
Expand Down
1 change: 1 addition & 0 deletions scripts/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export async function publishStarterCli(

console.log(` update devDependencies["@builder.io/qwik"] = "${version}"`);
baseAppPkg.devDependencies['@builder.io/qwik'] = version;
baseAppPkg.devDependencies['eslint-plugin-qwik'] = version;

const rootPkg = await readPackageJson(config.rootDir);
const typescriptDepVersion = rootPkg.devDependencies!.typescript;
Expand Down
30 changes: 30 additions & 0 deletions starters/apps/base/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
**/*.log
**/.DS_Store
*.
.vscode/settings.json
.history
.yarn
bazel-*
bazel-bin
bazel-out
bazel-qwik
bazel-testlogs
dist
dist-dev
lib
etc
external
node_modules
temp
tsc-out
tsdoc-metadata.json
target
output
rollup.config.js
build
.cache
.vscode
.rollup.cache
dist
tsconfig.tsbuildinfo
vite.config.ts
39 changes: 39 additions & 0 deletions starters/apps/base/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
module.exports = {
env: {
browser: true,
es2021: true,
node: true,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:qwik/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
ecmaVersion: 2021,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
plugins: ['@typescript-eslint'],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-inferrable-types': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/no-namespace': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-this-alias': 'off',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'prefer-spread': 'off',
'no-case-declarations': 'off',
'no-console': 'off',
'@typescript-eslint/no-unused-vars': ['error'],
},
};
12 changes: 6 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@builder.io/qwik-city@workspace:packages/qwik-city"
dependencies:
"@builder.io/qwik": 0.0.27
"@builder.io/qwik": 0.0.28
"@mdx-js/mdx": ^2.1.1
"@microsoft/api-extractor": 7.24.2
"@types/github-slugger": ^1.3.0
Expand Down Expand Up @@ -453,10 +453,10 @@ __metadata:
languageName: node
linkType: hard

"@builder.io/qwik@npm:0.0.27":
version: 0.0.27
resolution: "@builder.io/qwik@npm:0.0.27"
checksum: 04a8531a3c837d0f27cad5ea3cfb439c5f6dbb1e542f401147d5cf8c20bab5225f074ac6878a6ccc2eb99a65ea6458b34cdd8f47fa65ff1b85cb7c76c19ca23a
"@builder.io/qwik@npm:0.0.28":
version: 0.0.28
resolution: "@builder.io/qwik@npm:0.0.28"
checksum: 4ecdfcf70766e4fa9475341e9303322bd58567d15ac729d845c3e82474c170f0486ba5054e7a2ade75761f90b455480b48bf3f1b8380d87fe5d51ccfdbd3ee4f
languageName: node
linkType: hard

Expand Down Expand Up @@ -7719,7 +7719,7 @@ __metadata:
resolution: "qwik-docs@workspace:packages/docs"
dependencies:
"@builder.io/partytown": ^0.6.1
"@builder.io/qwik": 0.0.27
"@builder.io/qwik": 0.0.28
"@builder.io/qwik-city": 0.0.12
"@cloudflare/kv-asset-handler": 0.2.0
autoprefixer: 10.4.7
Expand Down

0 comments on commit 90c25d9

Please sign in to comment.