lincd-cli 0.2.31 → 0.2.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,42 +1,43 @@
1
1
  {
2
- "env": {
3
- "browser": true,
4
- "es2021": true,
5
- "jest": true
2
+ "env": {
3
+ "browser": true,
4
+ "es2021": true,
5
+ "jest": true
6
+ },
7
+ "extends": [
8
+ "plugin:react/recommended",
9
+ "plugin:@typescript-eslint/recommended",
10
+ "plugin:import/recommended",
11
+ "prettier"
12
+ ],
13
+ "overrides": [],
14
+ "parser": "@typescript-eslint/parser",
15
+ "parserOptions": {
16
+ "ecmaFeatures": {
17
+ "jsx": true
6
18
  },
7
- "extends": [
8
- "plugin:react/recommended",
9
- "plugin:@typescript-eslint/recommended",
10
- "prettier",
11
- "plugin:import/recommended"
12
- ],
13
- "overrides": [],
14
- "parser": "@typescript-eslint/parser",
15
- "parserOptions": {
16
- "ecmaFeatures": {
17
- "jsx": true
18
- },
19
- "ecmaVersion": 12,
20
- "sourceType": "module"
21
- },
22
- "plugins": [ "react", "@typescript-eslint", "react-hooks" ],
23
- "rules": {
24
- "no-use-before-define": "off",
25
- "@typescript-eslint/no-use-before-define": [ "error" ],
26
- "react/jsx-filename-extension": [ "warn", { "extensions": [ ".tsx" ] } ],
27
- "import/extensions": [ "error", "ignorePackages", { "ts": "never", "tsx": "never" } ],
28
- "no-shadow": "off",
29
- "@typescript-eslint/no-shadow": [ "error" ],
30
- "@typescript-eslint/explicit-function-return-type": [ "error", { "allowExpressions": true } ],
31
- "max-len": [ "warn", { "code": 100, "ignoreComments": true, "ignoreUrls": true } ],
32
- "react-hooks/rules-of-hooks": "error",
33
- "react-hooks/exhaustive-deps": "warn",
34
- "import/prefer-default-export": "off",
35
- "react/prop-types": "off"
36
- },
37
- "settings": {
38
- "import/resolver": {
39
- "typescript": {}
40
- }
19
+ "ecmaVersion": 12,
20
+ "sourceType": "module"
21
+ },
22
+ "plugins": [ "react", "@typescript-eslint", "react-hooks" ],
23
+ "rules": {
24
+ "no-use-before-define": "off",
25
+ "react/react-in-jsx-scope": "off",
26
+ "@typescript-eslint/explicit-function-return-type" : "off",
27
+ "@typescript-eslint/no-use-before-define": [ "error" ],
28
+ "react/jsx-filename-extension": [ "warn", { "extensions": [ ".tsx" ] } ],
29
+ "import/extensions": [ "error", "ignorePackages", { "ts": "never", "tsx": "never" } ],
30
+ "no-shadow": "off",
31
+ "@typescript-eslint/no-shadow": [ "error" ],
32
+ "max-len": [ "warn", { "code": 100, "ignoreComments": true, "ignoreUrls": true } ],
33
+ "react-hooks/rules-of-hooks": "error",
34
+ "react-hooks/exhaustive-deps": "warn",
35
+ "import/prefer-default-export": "off",
36
+ "react/prop-types": "off"
37
+ },
38
+ "settings": {
39
+ "import/resolver": {
40
+ "typescript": {}
41
41
  }
42
- }
42
+ }
43
+ }
@@ -21,12 +21,19 @@
21
21
  "postinstall": "husky install && echo 'Please run this command manually: node scripts/prepare.js'",
22
22
  "server:dev": "env-cmd -e _main,development nodemon --quiet --watch ./src/index.tsx ./scripts/start-server.js",
23
23
  "server:prod": "env-cmd -e _main,production node ./scripts/start-server.js",
24
- "lint": "eslint \"src/**/*.{js,jsx,ts,tsx}\""
24
+ "lint": "eslint \"src/**/*.{js,jsx,ts,tsx}\"",
25
+ "lint:fix": "yarn lint --fix",
26
+ "prettier": "prettier \"src/**/*.{js,jsx,ts,tsx,css,scss}\" --check",
27
+ "prettier:fix": "yarn prettier --write",
28
+ "format": "yarn prettier:fix && yarn lint:fix"
25
29
  },
26
30
  "lint-staged": {
27
- "*.{js,ts,scss,css}": [
31
+ "*.{js,ts,tsx}": [
28
32
  "prettier --write",
29
- "yarn lint"
33
+ "eslint --fix"
34
+ ],
35
+ "*.{scss,css}": [
36
+ "prettier --write"
30
37
  ]
31
38
  },
32
39
  "workspaces" : [
@@ -64,7 +71,15 @@
64
71
  "@types/node": "^18.11.10",
65
72
  "@types/react": "^18.0.17",
66
73
  "@types/react-dom": "^18.0.6",
74
+ "@typescript-eslint/eslint-plugin": "latest",
75
+ "@typescript-eslint/parser": "latest",
67
76
  "env-cmd": "^10.1.0",
77
+ "eslint": "latest",
78
+ "eslint-config-prettier": "^8.9.0",
79
+ "eslint-import-resolver-typescript": "^3.5.5",
80
+ "eslint-plugin-prettier": "^5.0.0",
81
+ "eslint-plugin-react": "latest",
82
+ "eslint-plugin-react-hooks": "^4.6.0",
68
83
  "husky": "^8.0.0",
69
84
  "lincd-cli": "^0.2",
70
85
  "nodemon": "^2.0.22",
@@ -1,5 +1,5 @@
1
- import React,{lazy,Suspense} from 'react';
2
- import {Route,Routes} from 'react-router-dom';
1
+ import React, {lazy, Suspense} from 'react';
2
+ import {Route, Routes} from 'react-router-dom';
3
3
  import {Spinner} from './components/Spinner';
4
4
 
5
5
  //In React 18 you can use 'lazy' to import pages only when you need them.
@@ -21,8 +21,8 @@ export default function AppRoutes() {
21
21
  return (
22
22
  <Routes>
23
23
  {Object.keys(ROUTES).map((routeName) => {
24
- let route = ROUTES[routeName];
25
- let Component = route.component;
24
+ const route = ROUTES[routeName];
25
+ const Component = route.component;
26
26
  return (
27
27
  <Route
28
28
  key={route.path}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lincd-cli",
3
- "version": "0.2.31",
3
+ "version": "0.2.32",
4
4
  "description": "Command line tools for the lincd.js library",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {