eslint-config-teselagen 6.1.5 → 6.1.6

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.
@@ -0,0 +1,3 @@
1
+ {
2
+ "extends": "teselagen/react"
3
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "example",
3
+ "devDependencies": {
4
+ "eslint": "^8.57.0",
5
+ "eslint-config-teselagen": "link:.."
6
+ },
7
+ "volta": {
8
+ "node": "16.20.2",
9
+ "yarn": "1.22.21"
10
+ },
11
+ "version": "0.0.2"
12
+ }
@@ -0,0 +1,5 @@
1
+
2
+ module.exports = {
3
+ //choose one of the following:
4
+ extends: "../.eslintrc.json",
5
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "ts_example",
3
+ "volta": {
4
+ "node": "16.20.2",
5
+ "yarn": "1.22.21"
6
+ }
7
+ }
@@ -0,0 +1,6 @@
1
+ import React from "react"
2
+
3
+ export const SomeReactComponent = ({test}) => {
4
+ const list = [1,2,3]
5
+ return <div>{list.map(el => <p key={el}>{el}</p>)}</div>
6
+ }
@@ -0,0 +1,15 @@
1
+ import { a } from "./someotherfile"
2
+ import type SomeType from "./sometype"
3
+ import type { SomeOtherType } from "./someothertype"
4
+ import { someexport } from "./somejsfile"
5
+ import type { SomeJSType } from "./somejsfile.d.ts"
6
+
7
+
8
+
9
+
10
+
11
+
12
+ someexport()
13
+
14
+ const b = a
15
+
@@ -0,0 +1,5 @@
1
+ export type SomeJSType = {
2
+ a: string
3
+ }
4
+
5
+ export function someexport() {}
@@ -0,0 +1,8 @@
1
+ const someexport = () => {
2
+
3
+ console.log("hello world");
4
+ console.log("zoink")
5
+ window.name = "zoink"
6
+ name = "zoink"
7
+ };
8
+ export { someexport };
@@ -0,0 +1,4 @@
1
+ const a = "bbb"
2
+
3
+
4
+ export { a }
@@ -0,0 +1,6 @@
1
+ type SomeOtherType = {
2
+ name: string;
3
+ age: number;
4
+ }
5
+ export { SomeOtherType };
6
+
@@ -0,0 +1,6 @@
1
+ type SomeType = {
2
+ name: string;
3
+ age: number;
4
+ }
5
+ export default SomeType;
6
+
@@ -0,0 +1,2 @@
1
+ const a = "bbb"
2
+ console.log("hello world")
@@ -0,0 +1,4 @@
1
+ # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2
+ # yarn lockfile v1
3
+
4
+
@@ -0,0 +1,68 @@
1
+ {
2
+ "compilerOptions": {
3
+ "jsx": "react",
4
+ /* Basic Options */
5
+ "target": "es2015" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */,
6
+ "module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
7
+ "resolveJsonModule": true,
8
+ "lib": [
9
+ /* Specify library files to be included in the compilation. */
10
+ "dom",
11
+ "es2015"
12
+ ],
13
+ "allowJs": true /* Allow javascript files to be compiled. */,
14
+ "checkJs": false /* Report errors in .js files. */,
15
+ // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
16
+ // "declaration": true /* Generates corresponding '.d.ts' file. */,
17
+ "sourceMap": true /* Generates corresponding '.map' file. */,
18
+ // "outFile": "./", /* Concatenate and emit output to single file. */
19
+ "outDir": "build" /* Redirect output structure to the directory. */,
20
+ // "rootDir": "./" /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */,
21
+ "baseUrl": ".",
22
+ "removeComments": false /* Do not emit comments to output. */,
23
+ // "noEmit": true, /* Do not emit outputs. */
24
+ // "importHelpers": true, /* Import emit helpers from 'tslib'. */
25
+ // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
26
+ // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
27
+
28
+ /* Strict Type-Checking Options */
29
+ "strict": true /* Enable all strict type-checking options. */,
30
+ "noImplicitAny": true /* Raise error on expressions and declarations with an implied 'any' type. */,
31
+ "strictNullChecks": true /* Enable strict null checks. */,
32
+ "strictFunctionTypes": true /* Enable strict checking of function types. */,
33
+ "strictPropertyInitialization": false /* Enable strict checking of property initialization in classes. */,
34
+ "noImplicitThis": true /* Raise error on 'this' expressions with an implied 'any' type. */,
35
+ "alwaysStrict": true /* Parse in strict mode and emit "use strict" for each source file. */,
36
+ "skipLibCheck": true,
37
+ /* Additional Checks */
38
+ "noUnusedLocals": true /* Report errors on unused locals. */,
39
+ "noUnusedParameters": true /* Report errors on unused parameters. */,
40
+ "noImplicitReturns": true /* Report error when not all code paths in function return a value. */,
41
+ "noFallthroughCasesInSwitch": true /* Report errors for fallthrough cases in switch statement. */,
42
+ "useUnknownInCatchVariables": false /* Sets variable as any instead of unknown in catch blcoks. */,
43
+
44
+ /* Module Resolution Options */
45
+ "moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */,
46
+ // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
47
+ // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
48
+ // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
49
+ // "typeRoots": [], /* List of folders to include type definitions from. */
50
+ "typeRoots": ["./@types", "./node_modules/@types"],
51
+ "allowSyntheticDefaultImports": true /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */,
52
+ "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
53
+ // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
54
+ "forceConsistentCasingInFileNames": true,
55
+
56
+ /* Source Map Options */
57
+ // "sourceRoot": "./", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
58
+ // "mapRoot": "./", /* Specify the location where debugger should locate map files instead of generated locations. */
59
+ // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
60
+ // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
61
+
62
+ /* Experimental Options */
63
+ "experimentalDecorators": true /* Enables experimental support for ES7 decorators. */,
64
+ "emitDecoratorMetadata": true /* Enables experimental support for emitting type metadata for decorators. */
65
+ },
66
+ "include": ["src-*/**/*", "tsExample"],
67
+ "exclude": ["@types", "node_modules", "build-*/**/*"]
68
+ }
package/node.js CHANGED
@@ -1,7 +1,7 @@
1
1
  require("@rushstack/eslint-patch/modern-module-resolution");
2
2
 
3
3
  module.exports = {
4
- extends: ["./base-config.js", "./node-react-config.js"],
4
+ extends: ["./base-config.js"],
5
5
  parser: "@typescript-eslint/parser",
6
6
  plugins: ["@typescript-eslint"],
7
7
  env: {
@@ -9,10 +9,4 @@ module.exports = {
9
9
  browser: true,
10
10
  mocha: true,
11
11
  },
12
- rules: {
13
- "no-redeclare": 2,
14
- "comma-dangle": 0,
15
- "no-mixed-spaces-and-tabs": 0,
16
- "linebreak-style": [0, "unix"],
17
- },
18
12
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-teselagen",
3
- "version": "6.1.5",
3
+ "version": "6.1.6",
4
4
  "description": "teselagen linter rules",
5
5
  "repository": "https://github.com/TeselaGen/eslint-config-teselagen.git",
6
6
  "author": "teselagen team@teselagen",
package/react.js CHANGED
@@ -1,11 +1,10 @@
1
1
  require("@rushstack/eslint-patch/modern-module-resolution");
2
2
 
3
3
  module.exports = {
4
- extends: ["plugin:react/recommended", "plugin:react-hooks/recommended", "./base-config.js", "./node-react-config.js"],
4
+ extends: ["plugin:react/recommended", "plugin:react-hooks/recommended", "./base-config.js"],
5
5
  parser: "@typescript-eslint/parser",
6
6
  plugins: ["@typescript-eslint"],
7
7
  rules: {
8
- "no-const-assign": 2,
9
8
  "react/jsx-boolean-value": 0,
10
9
  "react/jsx-key": 2,
11
10
  "react/prop-types": 0,
package/es5.js DELETED
@@ -1,39 +0,0 @@
1
- module.exports = {
2
- "env": {
3
- "node": true,
4
- "browser": true,
5
- "mocha": true
6
- },
7
- "parser": "babel-eslint",
8
- "rules": {
9
- "import/no-anonymous-default-export": 0,
10
- "no-undef": 2,
11
- 'no-console': [1, { allow: ['warn', 'error', "info"] }],
12
- "no-unused-vars": 1,
13
- "no-redeclare": 2,
14
- "comma-dangle": 0,
15
- "no-mixed-spaces-and-tabs": 0,
16
- "indent": [0, "tab"],
17
- "quotes": [0, "double"],
18
- "linebreak-style": [0, "unix"],
19
- "semi": [0, "always"],
20
- "no-var": 2,
21
- "no-debugger": 2,
22
- "no-empty": [2],
23
- "no-extra-boolean-cast": 2,
24
- "no-extra-semi": 1,
25
- "no-inner-declarations": [2, "functions"],
26
- "no-unneeded-ternary": 1,
27
- "no-unsafe-negation": 2,
28
- "import/no-unresolved": 2,
29
- "import/named": 2,
30
- "import/default": 2,
31
- "object-shorthand": 0,
32
- "no-else-return": 0,
33
- "react/jsx-no-bind": 1,
34
- "react/jsx-boolean-value": 0,
35
- "react/jsx-key": 2,
36
- "jsx-a11y/href-no-hash": 0
37
- }
38
-
39
- };
@@ -1,15 +0,0 @@
1
- module.exports = {
2
- rules: {
3
- "no-var": 2,
4
- "no-console": [1, { allow: ["warn", "error", "info"] }],
5
- "no-debugger": 2,
6
- "no-empty": [2],
7
- "no-extra-boolean-cast": 2,
8
- "no-extra-semi": 1,
9
- "no-inner-declarations": [2, "functions"],
10
- "no-undef": 2,
11
- "no-unneeded-ternary": 1,
12
- "no-unsafe-negation": 2,
13
- "prefer-const": [1, { destructuring: "all" }],
14
- },
15
- };