eslint-config-dolmios 2.0.1 → 2.0.3

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,28 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "compilerOptions": {
4
+ "module": "esnext",
5
+ "importHelpers": true,
6
+ "declaration": true,
7
+ "sourceMap": true,
8
+ "strict": true,
9
+ "noImplicitReturns": true,
10
+ "noFallthroughCasesInSwitch": true,
11
+ "noUnusedLocals": true,
12
+ "noUnusedParameters": true,
13
+ "moduleResolution": "node",
14
+ "esModuleInterop": true,
15
+ "skipLibCheck": true,
16
+ "forceConsistentCasingInFileNames": true,
17
+ "allowSyntheticDefaultImports": true,
18
+ "jsx": "react-jsx",
19
+ "lib": ["dom", "dom.iterable", "esnext"],
20
+ "target": "es2022",
21
+ "allowJs": true,
22
+ "resolveJsonModule": true,
23
+ "isolatedModules": true,
24
+ "emitDecoratorMetadata": true,
25
+ "experimentalDecorators": true
26
+ },
27
+ "display": "dolmios"
28
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "$schema": "http://json.schemastore.org/prettierrc",
3
+ "bracketSameLine": true,
4
+ "printWidth": 100,
5
+ "endOfLine": "lf"
6
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "compilerOptions": {
4
+ "allowJs": true, // Allows JavaScript files to be compiled
5
+ "esModuleInterop": true, // Enables default imports from modules with no default export
6
+ "forceConsistentCasingInFileNames": true, // Disallows inconsistently-cased references to the same file
7
+ "incremental": true, // Enables incremental compilation
8
+ "isolatedModules": true, // Ensures each file can be safely transpiled without relying on other imports
9
+ "jsx": "preserve", // Preserves JSX as part of the output to be further consumed by another transform step
10
+ "lib": ["dom", "dom.iterable", "esnext"], // Specifies library files to be included in the compilation
11
+ "module": "esnext", // Specifies module code generation
12
+ "moduleResolution": "node", // Specifies module resolution strategy
13
+ "noEmit": true, // Suppresses output of .js files
14
+ "resolveJsonModule": true, // Allows importing of JSON modules
15
+ "skipLibCheck": true, // Skips type checking of declaration files
16
+ "strict": true, // Enables all strict type-checking options
17
+ "strictNullChecks": true, // Enforces strict null checks
18
+ "noImplicitAny": true, // Raises an error on expressions and declarations with an implied 'any' type
19
+ "noImplicitReturns": true, // Raises an error when not all code paths in a function return a value
20
+ "noImplicitThis": true, // Raises an error on 'this' expressions with an implied 'any' type
21
+ "alwaysStrict": true, // Parse in strict mode and emit "use strict" for each source file
22
+ "noUnusedLocals": true, // Reports errors on unused locals
23
+ "noUnusedParameters": true, // Reports errors on unused parameters
24
+ "experimentalDecorators": true, // Enables experimental support for ES7 decorators
25
+ "emitDecoratorMetadata": true, // Emits design-type metadata for decorated declarations in source
26
+ "target": "es2022" // Specifies ECMAScript target version
27
+ },
28
+ "display": "dolmios"
29
+ }
package/eslint.config.js CHANGED
@@ -12,6 +12,21 @@ import globals from 'globals';
12
12
 
13
13
  export default [
14
14
  js.configs.recommended,
15
+ {
16
+ ignores: [
17
+ '**/node_modules/**',
18
+ '**/dist/**',
19
+ '**/build/**',
20
+ '**/.next/**',
21
+ '**/out/**',
22
+ '**/coverage/**',
23
+ '**/*.min.js',
24
+ '**/public/**',
25
+ '**/storybook-static/**',
26
+ '**/test/**',
27
+ '**/tests/**'
28
+ ],
29
+ },
15
30
  {
16
31
  files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
17
32
  languageOptions: {
@@ -20,10 +35,13 @@ export default [
20
35
  ecmaVersion: 'latest',
21
36
  sourceType: 'module',
22
37
  ecmaFeatures: { jsx: true },
38
+ project: './tsconfig.json',
39
+ tsconfigRootDir: '.',
23
40
  },
24
41
  globals: {
25
42
  ...globals.browser,
26
- ...globals.node
43
+ ...globals.node,
44
+ google: true,
27
45
  }
28
46
  },
29
47
  linterOptions: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-dolmios",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
4
4
  "description": "A simple ESLint config with Prettier and a couple TSConfig setups",
5
5
  "author": "Jackson Dolman <mail@dolmios.com>",
6
6
  "bugs": {
@@ -30,7 +30,8 @@
30
30
  },
31
31
  "files": [
32
32
  "eslint.config.js",
33
- "rules.js"
33
+ "rules.js",
34
+ "configs"
34
35
  ],
35
36
  "homepage": "https://github.com/dolmios/eslint-config-dolmios#readme",
36
37
  "keywords": [
package/rules.js CHANGED
@@ -8,6 +8,10 @@ const typescriptRules = {
8
8
  'warn',
9
9
  { args: 'none', ignoreRestSiblings: true, argsIgnorePattern: '^_' },
10
10
  ],
11
+ '@typescript-eslint/no-explicit-any': 'warn',
12
+ '@typescript-eslint/ban-ts-comment': ['warn', { 'ts-ignore': 'allow-with-description' }],
13
+ '@typescript-eslint/no-inferrable-types': 'warn',
14
+ '@typescript-eslint/prefer-as-const': 'warn',
11
15
  'no-unused-vars': 'off',
12
16
  };
13
17
 
@@ -78,6 +82,12 @@ const nextRules = {
78
82
  '@next/next/no-html-link-for-pages': 'warn',
79
83
  '@next/next/no-img-element': 'warn',
80
84
  '@next/next/no-unwanted-polyfillio': 'warn',
85
+ '@next/next/no-css-tags': 'warn',
86
+ '@next/next/no-sync-scripts': 'warn',
87
+ '@next/next/google-font-display': 'warn',
88
+ '@next/next/google-font-preconnect': 'warn',
89
+ '@next/next/next-script-for-ga': 'warn',
90
+ '@next/next/no-page-custom-font': 'warn',
81
91
  };
82
92
 
83
93
  // Perfectionist rules