Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/brown-flies-notice.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@faustwp/block-editor-utils': patch
'@faustwp/core': patch
'@faustwp/cli': patch
---

Updated code formatting config and switch to tabs. Configure your editor config settings for tab sizing preferences.
16 changes: 12 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
# Stop the editor from looking for .editorconfig files in the parent directories
root = true

[*]
# Non-configurable Prettier behaviors
charset = utf-8
end_of_line = lf
indent_style = tab
insert_final_newline = true
# Caveat: Prettier won’t trim trailing whitespace inside template strings, but your editor might.
trim_trailing_whitespace = true
indent_size = 4

[{*.yml,package.json,*.md,*.tsx,*.ts,*.js,*.jsx}]
# Configurable Prettier behaviors
# (change these if your Prettier config differs)
end_of_line = lf
indent_style = tab
indent_size = 2
max_line_length = 80

[*.{yaml,yml}]
# YAML files should use spaces, not tabs
indent_style = space
indent_size = 2
181 changes: 91 additions & 90 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,91 +1,92 @@
module.exports = {
root: true,
env: {
browser: true,
es6: true,
node: true,
amd: true,
},
parser: '@typescript-eslint/parser', // Specifies the ESLint parser
extends: [
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'airbnb',
'airbnb-typescript',
'airbnb/hooks',
'plugin:prettier/recommended', // Enables eslint-plugin-prettier and eslint-config-prettier. This will display prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
],
parserOptions: {
tsconfigRootDir: __dirname,
project: './tsconfig.json',
ecmaFeatures: {
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
sourceType: 'module', // Allows for the use of imports
jsx: true,
},
},
plugins: ['import', 'simple-import-sort', 'react', 'react-hooks'],
rules: {
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
// e.g. "@typescript-eslint/explicit-function-return-type": "off",
'@typescript-eslint/unbound-method': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-unsafe-call': 0,
'@typescript-eslint/no-unsafe-return': 0,
'@typescript-eslint/no-unsafe-argument': 0,
'@typescript-eslint/restrict-template-expressions': 0,
'no-void': 0,
'import/named': 0,
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: [
'jest.setup.ts',
'**/__tests__/*',
'**/*.test.ts',
'**/*.test.tsx',
],
},
],
'import/prefer-default-export': 0,
'react/jsx-closing-bracket-location': 0,
'react/jsx-props-no-spreading': ['error', { html: 'ignore' }],
'react/jsx-wrap-multilines': [
'error',
{ declaration: false, assignment: false },
],
'react/prop-types': 0,
'react/require-default-props': 0,
'@typescript-eslint/no-unsafe-assignment': 0,
'@typescript-eslint/no-unsafe-member-access': 0,
'jsx-a11y/anchor-is-valid': 0,
'no-console': ['error', { allow: ['warn', 'error', 'debug'] }],
'no-underscore-dangle': ['error', { 'allow': ['__schema'] }],
'import/extensions': ['error', 'always'],
},
settings: {
react: {
createClass: 'createReactClass', // Regex for Component Factory to use,
// default to "createReactClass"
pragma: 'React', // Pragma to use, default to "React"
version: '17.0', // React version. "detect" automatically picks the version you have installed.
// You can also use `16.0`, `16.3`, etc, if you want to override the detected value.
// default to latest and warns if missing
// It will default to "detect" in the future
},
},
ignorePatterns: [
'**/test/*',
'**/tests/*',
'.prettierrc.js',
'jest.config.js',
'jest.setup.ts',
'utils.d.ts',
'utils.js',
'.eslintrc.js',
'**/dist/*',
'**/*.d.ts',
'examples/**/*'
],
};
root: true,
env: {
browser: true,
es6: true,
node: true,
amd: true,
},
parser: '@typescript-eslint/parser', // Specifies the ESLint parser
extends: [
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'airbnb',
'airbnb-typescript',
'airbnb/hooks',
'prettier', // Enables eslint-config-prettier. Make sure this is always the last configuration in the extends array.
],
parserOptions: {
tsconfigRootDir: __dirname,
project: './tsconfig.json',
ecmaFeatures: {
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
sourceType: 'module', // Allows for the use of imports
jsx: true,
},
},
plugins: ['import', 'simple-import-sort', 'react', 'react-hooks'],
rules: {
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
// e.g. "@typescript-eslint/explicit-function-return-type": "off",
'@typescript-eslint/unbound-method': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-unsafe-call': 0,
'@typescript-eslint/no-unsafe-return': 0,
'@typescript-eslint/no-unsafe-argument': 0,
'@typescript-eslint/restrict-template-expressions': 0,
'no-void': 0,
'import/named': 0,
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: [
'jest.setup.ts',
'**/__tests__/*',
'**/*.test.ts',
'**/*.test.tsx',
],
},
],
'import/prefer-default-export': 0,
'react/jsx-closing-bracket-location': 0,
'react/jsx-props-no-spreading': ['error', { html: 'ignore' }],
'react/jsx-wrap-multilines': [
'error',
{ declaration: false, assignment: false },
],
'react/prop-types': 0,
'react/require-default-props': 0,
'@typescript-eslint/no-unsafe-assignment': 0,
'@typescript-eslint/no-unsafe-member-access': 0,
'jsx-a11y/anchor-is-valid': 0,
'no-console': ['error', { allow: ['warn', 'error', 'debug'] }],
'no-underscore-dangle': ['error', { allow: ['__schema'] }],
'import/extensions': ['error', 'always'],
'arrow-body-style': 0,
},
settings: {
react: {
createClass: 'createReactClass', // Regex for Component Factory to use,
// default to "createReactClass"
pragma: 'React', // Pragma to use, default to "React"
version: '17.0', // React version. "detect" automatically picks the version you have installed.
// You can also use `16.0`, `16.3`, etc, if you want to override the detected value.
// default to latest and warns if missing
// It will default to "detect" in the future
},
},
ignorePatterns: [
'**/test/*',
'**/tests/*',
'.prettierrc.js',
'jest.config.js',
'jest.setup.ts',
'utils.d.ts',
'utils.js',
'.eslintrc.js',
'**/dist/*',
'**/*.d.ts',
'examples/**/*',
],
};
3 changes: 0 additions & 3 deletions .prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ module.exports = {
arrowParens: 'always',
bracketSameLine: true,
singleQuote: true,
tabWidth: 2,
semi: true,
trailingComma: 'all',
endOfLine: 'lf',
useTabs: false,
};
Loading
Loading