add-cms
This commit is contained in:
1 parent
30106e0129
commit
0ae8d7a709
1044 files changed
+321581
No files matched your search
@@ -30,6 +30,7 @@ code_dir: downloads/code
|
|||||||
i18n_dir: :lang
|
i18n_dir: :lang
|
||||||
skip_render:
|
skip_render:
|
||||||
- "*.txt"
|
- "*.txt"
|
||||||
|
- admin/**/*
|
||||||
|
|
||||||
# Writing
|
# Writing
|
||||||
new_post_name: :title.md # File name of new posts
|
new_post_name: :title.md # File name of new posts
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
# https://editorconfig.org
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
charset = utf-8
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
insert_final_newline = true
|
||||||
|
|
||||||
|
[*.js]
|
||||||
|
quote_type = single
|
||||||
|
spaces_around_operators = true
|
||||||
|
|
||||||
|
[*.css]
|
||||||
|
quote_type = single
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
trim_trailing_whitespace = false
|
||||||
@@ -0,0 +1,105 @@
|
|||||||
|
const fs = require('fs');
|
||||||
|
|
||||||
|
const packages = fs
|
||||||
|
.readdirSync(`${__dirname}/packages`, { withFileTypes: true })
|
||||||
|
.filter(dirent => dirent.isDirectory())
|
||||||
|
.map(dirent => dirent.name);
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
parser: 'babel-eslint',
|
||||||
|
extends: [
|
||||||
|
'eslint:recommended',
|
||||||
|
'plugin:react/recommended',
|
||||||
|
'plugin:cypress/recommended',
|
||||||
|
'prettier',
|
||||||
|
'plugin:import/recommended',
|
||||||
|
],
|
||||||
|
env: {
|
||||||
|
es6: true,
|
||||||
|
browser: true,
|
||||||
|
node: true,
|
||||||
|
jest: true,
|
||||||
|
'cypress/globals': true,
|
||||||
|
},
|
||||||
|
globals: {
|
||||||
|
DECAP_CMS_VERSION: false,
|
||||||
|
DECAP_CMS_APP_VERSION: false,
|
||||||
|
DECAP_CMS_CORE_VERSION: false,
|
||||||
|
CMS_ENV: false,
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
'no-console': [0],
|
||||||
|
'react/prop-types': [0],
|
||||||
|
'import/no-named-as-default': 0,
|
||||||
|
'import/order': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
'newlines-between': 'always',
|
||||||
|
groups: [['builtin', 'external'], ['internal', 'parent', 'sibling', 'index'], ['type']],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
'no-duplicate-imports': 'error',
|
||||||
|
'@emotion/no-vanilla': 'error',
|
||||||
|
'@emotion/pkg-renaming': 'error',
|
||||||
|
'@emotion/import-from-emotion': 'error',
|
||||||
|
'@emotion/styled-import': 'error',
|
||||||
|
'require-atomic-updates': [0],
|
||||||
|
'object-shorthand': ['error', 'always'],
|
||||||
|
'func-style': ['error', 'declaration'],
|
||||||
|
'prefer-const': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
destructuring: 'all',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
'unicorn/prefer-string-slice': 'error',
|
||||||
|
'react/no-unknown-property': ['error', { ignore: ['css', 'bold', 'italic', 'delete'] }],
|
||||||
|
},
|
||||||
|
plugins: ['babel', '@emotion', 'cypress', 'unicorn'],
|
||||||
|
settings: {
|
||||||
|
react: {
|
||||||
|
version: 'detect',
|
||||||
|
},
|
||||||
|
'import/resolver': {
|
||||||
|
node: {
|
||||||
|
extensions: ['.js', '.jsx', '.ts', '.tsx'],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'import/core-modules': [...packages, 'decap-cms-app/dist/esm'],
|
||||||
|
},
|
||||||
|
overrides: [
|
||||||
|
{
|
||||||
|
files: ['*.ts', '*.tsx'],
|
||||||
|
parser: '@typescript-eslint/parser',
|
||||||
|
extends: [
|
||||||
|
'eslint:recommended',
|
||||||
|
'plugin:react/recommended',
|
||||||
|
'plugin:cypress/recommended',
|
||||||
|
'plugin:@typescript-eslint/recommended',
|
||||||
|
'prettier',
|
||||||
|
'plugin:import/recommended',
|
||||||
|
'plugin:import/typescript',
|
||||||
|
],
|
||||||
|
parserOptions: {
|
||||||
|
ecmaVersion: 2018,
|
||||||
|
sourceType: 'module',
|
||||||
|
ecmaFeatures: {
|
||||||
|
jsx: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
'no-duplicate-imports': [0], // handled by @typescript-eslint
|
||||||
|
'@typescript-eslint/ban-types': [0], // TODO enable in future
|
||||||
|
'@typescript-eslint/no-non-null-assertion': [0],
|
||||||
|
'@typescript-eslint/consistent-type-imports': 'error',
|
||||||
|
'@typescript-eslint/explicit-function-return-type': [0],
|
||||||
|
'@typescript-eslint/explicit-module-boundary-types': [0],
|
||||||
|
'@typescript-eslint/no-duplicate-imports': 'error',
|
||||||
|
'@typescript-eslint/no-use-before-define': [
|
||||||
|
'error',
|
||||||
|
{ functions: false, classes: true, variables: true },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
Loaded 3 of 1044 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user