mirror of
https://github.com/kremalicious/blog.git
synced 2025-01-02 18:13:10 +01:00
dev tweaks
This commit is contained in:
parent
01bcb6d6a3
commit
dd7c294185
@ -15,10 +15,10 @@
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"plugin:jsx-a11y/recommended",
|
||||
"prettier/@typescript-eslint",
|
||||
"prettier/react",
|
||||
"plugin:prettier/recommended",
|
||||
"plugin:react/recommended"
|
||||
],
|
||||
"plugins": ["@typescript-eslint", "react", "graphql", "jsx-a11y"],
|
||||
"rules": {
|
||||
"object-curly-spacing": ["error", "always"],
|
||||
"react/prop-types": "off",
|
||||
@ -26,9 +26,11 @@
|
||||
"@typescript-eslint/no-explicit-any": "off"
|
||||
},
|
||||
"parserOptions": {
|
||||
"ecmaFeatures": { "jsx": true },
|
||||
"ecmaVersion": 2018,
|
||||
"sourceType": "module",
|
||||
"ecmaFeatures": {
|
||||
"jsx": true
|
||||
},
|
||||
"project": "./tsconfig.json"
|
||||
}
|
||||
}
|
||||
|
@ -12,18 +12,20 @@
|
||||
"ssr": "npm run build && serve -s public/",
|
||||
"test": "npm run lint && jest --coverage",
|
||||
"test:watch": "npm run lint && jest --coverage --watch",
|
||||
"rename:scrypt": "sed -i -e 's|./build/Release/scrypt|scrypt|g' node_modules/scrypt/index.js",
|
||||
"copy": "cp -R content/media/ public",
|
||||
"lint": "run-p --continue-on-error lint:js lint:css lint:md",
|
||||
"lint:js": "eslint --ignore-path .gitignore --ext .js,.jsx,.ts,.tsx .",
|
||||
"lint:css": "stylelint 'src/**/*.{css,scss}'",
|
||||
"lint:md": "markdownlint './**/*.{md,markdown}' --ignore './{node_modules,public,.cache,.git,coverage}/**/*'",
|
||||
"format": "npm run lint:js -- --fix && npm run lint:css -- --fix",
|
||||
"format": "prettier --write 'src/**/*.{js,jsx,ts,tsx,md,json,css,scss}'",
|
||||
"deploy": "./scripts/deploy.sh",
|
||||
"new": "babel-node ./scripts/new.js"
|
||||
},
|
||||
"browserslist": [
|
||||
"last 2 versions"
|
||||
">0.2%",
|
||||
"not dead",
|
||||
"not ie <= 11",
|
||||
"not op_mini all"
|
||||
],
|
||||
"dependencies": {
|
||||
"dms2dec": "^1.1.0",
|
||||
|
13
src/@types/declarations.d.ts
vendored
13
src/@types/declarations.d.ts
vendored
@ -1,13 +0,0 @@
|
||||
declare module '*.scss' {
|
||||
const content: { [className: string]: string }
|
||||
export = content
|
||||
}
|
||||
|
||||
/* eslint-disable-next-line @typescript-eslint/no-empty-interface */
|
||||
interface SvgrComponent
|
||||
extends React.StatelessComponent<React.SVGAttributes<SVGElement>> {}
|
||||
|
||||
declare module '*.svg' {
|
||||
const value: SvgrComponent
|
||||
export default value
|
||||
}
|
23
src/@types/global.d.ts
vendored
Normal file
23
src/@types/global.d.ts
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
interface CSSModule {
|
||||
[className: string]: string
|
||||
}
|
||||
|
||||
// type shims for CSS modules
|
||||
declare module '*.module.scss' {
|
||||
const cssModule: CSSModule
|
||||
export = cssModule
|
||||
}
|
||||
|
||||
declare module '*.module.css' {
|
||||
const cssModule: CSSModule
|
||||
export = cssModule
|
||||
}
|
||||
|
||||
/* eslint-disable-next-line @typescript-eslint/no-empty-interface */
|
||||
interface SvgrComponent
|
||||
extends React.StatelessComponent<React.SVGAttributes<SVGElement>> {}
|
||||
|
||||
declare module '*.svg' {
|
||||
const value: SvgrComponent
|
||||
export default value
|
||||
}
|
@ -1,15 +1,17 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"outDir": "./dist/",
|
||||
"sourceMap": true,
|
||||
"noImplicitAny": true,
|
||||
"esModuleInterop": true,
|
||||
"module": "commonjs",
|
||||
"target": "esnext",
|
||||
"jsx": "preserve",
|
||||
"lib": ["dom", "es2015", "es2017"],
|
||||
"strict": true,
|
||||
"jsx": "react",
|
||||
"lib": ["dom", "esnext"],
|
||||
"noEmit": true
|
||||
"noEmit": true,
|
||||
"isolatedModules": true,
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"preserveConstEnums": true
|
||||
},
|
||||
"exclude": ["node_modules", "public", ".cache", "*.js"],
|
||||
"include": ["./src/**/*"]
|
||||
|
Loading…
Reference in New Issue
Block a user