Migrate from the cspell GitHub Action to the npm package.
* Easier to run spellchecking locally.
* More consistent setup between projects on GitHub or other forges.
While I was doing this, I also amended the config to allow "compound
words", then dropped any terms that were already in built-in
dictionaries and that became redundant to add in our config after
enabling compound words.
I saw complaints about `extendDefaultPlugins` api
- it cannot be used when svgo is installed globally
- it requires svgo to be installed when using svgo-loader or svgo-jsx
- it prevents using serializable config formats like json
In this diff I introduced the new plugin which is a bundle of all
default plugins.
```js
module.exports = {
plugins: [
'preset_default',
// or
{
name: 'preset_default',
floatPrecision: 4,
overrides: {
convertPathData: {
applyTransforms: false
}
}
}
]
}
```
These iterators allows to directly manipulate passed value
which does not let us to get rid from legacy "attrs" field.
Object.entries makes it easier to get an access to both attribute
name and value.
Ref https://github.com/syntax-tree/xast
- added type: root | element
- renamed elem to name
- replaced "elem" property checks with check for correct type